diff --git a/test/extended/ldap_groups.sh b/test/extended/ldap_groups.sh index 6d0b35b82e25..f2c3d4ab279a 100755 --- a/test/extended/ldap_groups.sh +++ b/test/extended/ldap_groups.sh @@ -217,6 +217,12 @@ for (( i=0; i<${#schema[@]}; i++ )); do oc adm groups prune --sync-config=sync-config.yaml --confirm compare_and_cleanup valid_all_ldap_sync_prune.yaml + echo -e "\tTEST: Sync all LDAP groups from LDAP server using whitelist file, then prune OpenShift groups using the same whitelist file" + oc adm groups sync --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm + os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup secondgroup thirdgroup' + oc adm groups prune --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm + os::cmd::expect_success_and_text 'oc get group -o name | wc -l' '0' + # PAGING echo -e "\tTEST: Sync all LDAP groups from LDAP server using paged queries" oc adm groups sync --sync-config=sync-config-paging.yaml --confirm