From 3450ed4536030ccc8ddd34836fc2e17ddc328a18 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 11 Apr 2018 00:32:49 +0200 Subject: integration test checking the group filter Signed-off-by: Arthur Schiwon --- .../ldap_features/ldap-openldap.feature | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'build/integration/ldap_features/ldap-openldap.feature') diff --git a/build/integration/ldap_features/ldap-openldap.feature b/build/integration/ldap_features/ldap-openldap.feature index c63fdf1f9c5..a2b16950bb1 100644 --- a/build/integration/ldap_features/ldap-openldap.feature +++ b/build/integration/ldap_features/ldap-openldap.feature @@ -15,3 +15,46 @@ Feature: LDAP And looking up details for the first result matches expectations | email | alice@nextcloud.ci | | displayname | Alice | + + Scenario: Test group filter with one specific group + Given having a valid LDAP configuration + And modify LDAP configuration + | ldapGroupFilter | cn=RedGroup | + | ldapBaseGroups | ou=Groups,ou=Ordinary,dc=nextcloud,dc=ci | + And As an "admin" + And sending "GET" to "/cloud/groups" + Then the OCS status code should be "200" + And the group result should + | RedGroup | 1 | + | GreenGroup | 0 | + | BlueGroup | 0 | + | PurpleGroup | 0 | + + Scenario: Test group filter with two specific groups + Given having a valid LDAP configuration + And modify LDAP configuration + | ldapGroupFilter | (\|(cn=RedGroup)(cn=GreenGroup)) | + | ldapBaseGroups | ou=Groups,ou=Ordinary,dc=nextcloud,dc=ci | + And As an "admin" + And sending "GET" to "/cloud/groups" + Then the OCS status code should be "200" + And the group result should + | RedGroup | 1 | + | GreenGroup | 1 | + | BlueGroup | 0 | + | PurpleGroup | 0 | + + Scenario: Test group filter ruling out a group from a different base + Given having a valid LDAP configuration + And modify LDAP configuration + | ldapGroupFilter | (objectClass=groupOfNames) | + | ldapBaseGroups | ou=Groups,ou=Ordinary,dc=nextcloud,dc=ci | + And As an "admin" + And sending "GET" to "/cloud/groups" + Then the OCS status code should be "200" + And the group result should + | RedGroup | 1 | + | GreenGroup | 1 | + | BlueGroup | 1 | + | PurpleGroup | 1 | + | SquareGroup | 0 | -- cgit v1.2.3