]> git.proxmox.com Git - pve-access-control.git/blobdiff - src/test/realm_sync_test.pl
add realm-sync regression test for new 'remove-vanished'
[pve-access-control.git] / src / test / realm_sync_test.pl
index 304c7ed83e8c72ab336279ebe46dbd7d3db23c6f..ea083f3c3dbb0acf79cc5a397c1291fa6bc3ee6e 100755 (executable)
@@ -317,6 +317,46 @@ my $tests = [
            },
        },
     ],
+    [
+       "don't delete properties, but users and acls",
+       {
+           realm => 'syncedrealm',
+           'remove-vanished' => 'acl;entry',
+           scope => 'both',
+       },
+       {
+           users => {
+               'root@pam' => { username => 'root', },
+               'user1@syncedrealm' => {
+                   username => 'user1',
+                   enable => 1,
+                   'keys' => 'some',
+               },
+               'user2@syncedrealm' => {
+                   username => 'user2',
+                   enable => 1,
+               },
+               'user4@syncedrealm' => {
+                   username => 'user4',
+                   enable => 1,
+               },
+           },
+           groups => {
+               'group1-syncedrealm' => {
+                   users => {
+                       'user1@syncedrealm' => 1,
+                   },
+               },
+               'group3-syncedrealm' => { users => {}, },
+           },
+           acl => {
+               '/' => {
+                   users => {},
+                   groups => {},
+               },
+           },
+       },
+    ],
 ];
 
 for my $test (@$tests) {