[pve-devel] [PATCH access-control v4 4/4] add realm-sync regression test for new 'remove-vanished'
Dominik Csapak
d.csapak at proxmox.com
Mon Mar 28 14:38:05 CEST 2022
by having a test case that does not delete properties, but acls and
entries
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/test/realm_sync_test.pl | 40 +++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/src/test/realm_sync_test.pl b/src/test/realm_sync_test.pl
index 304c7ed..ea083f3 100755
--- a/src/test/realm_sync_test.pl
+++ b/src/test/realm_sync_test.pl
@@ -317,6 +317,46 @@ my $tests = [
},
},
],
+ [
+ "don't delete properties, but users and acls",
+ {
+ realm => 'syncedrealm',
+ 'remove-vanished' => 'acl;entry',
+ scope => 'both',
+ },
+ {
+ users => {
+ 'root at pam' => { username => 'root', },
+ 'user1 at syncedrealm' => {
+ username => 'user1',
+ enable => 1,
+ 'keys' => 'some',
+ },
+ 'user2 at syncedrealm' => {
+ username => 'user2',
+ enable => 1,
+ },
+ 'user4 at syncedrealm' => {
+ username => 'user4',
+ enable => 1,
+ },
+ },
+ groups => {
+ 'group1-syncedrealm' => {
+ users => {
+ 'user1 at syncedrealm' => 1,
+ },
+ },
+ 'group3-syncedrealm' => { users => {}, },
+ },
+ acl => {
+ '/' => {
+ users => {},
+ groups => {},
+ },
+ },
+ },
+ ],
];
for my $test (@$tests) {
--
2.30.2
More information about the pve-devel
mailing list