]> git.proxmox.com Git - pve-access-control.git/commitdiff
add realm-sync regression test for new 'remove-vanished'
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 28 Mar 2022 12:38:05 +0000 (14:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 26 Apr 2022 11:06:23 +0000 (13:06 +0200)
by having a test case that does not delete properties, but acls and
entries

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
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) {