From 487b43b0a9748342862e10d9077fbbc085549bc9 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 23 Mar 2022 11:27:55 +0100 Subject: [PATCH 1/2] Fix ou assignemnt in LDAP tests The OUs for group where mixed up. This went unnoticed since the reva configuration was using the top of the LDAP tree as the search base for users and groups. --- tests/acceptance/features/bootstrap/Provisioning.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/features/bootstrap/Provisioning.php b/tests/acceptance/features/bootstrap/Provisioning.php index 3ea3ed5abe00..e3bd10bba106 100644 --- a/tests/acceptance/features/bootstrap/Provisioning.php +++ b/tests/acceptance/features/bootstrap/Provisioning.php @@ -534,8 +534,8 @@ public function connectToLdap(array $suiteParameters):void { $useSsl = false; if (OcisHelper::isTestingOnOcisOrReva()) { $this->ldapBaseDN = OcisHelper::getBaseDN(); - $this->ldapUsersOU = OcisHelper::getGroupsOU(); - $this->ldapGroupsOU = OcisHelper::getUsersOU(); + $this->ldapUsersOU = OcisHelper::getUsersOU(); + $this->ldapGroupsOU = OcisHelper::getGroupsOU(); $this->ldapGroupSchema = OcisHelper::getGroupSchema(); $this->ldapHost = OcisHelper::getHostname(); $this->ldapPort = OcisHelper::getLdapPort(); From 5e5c1be7fb1a36531b6b08d5611825503838d3dc Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 23 Mar 2022 11:34:47 +0100 Subject: [PATCH 2/2] Always add mail attribute to LDAP users when testing with ocis --- tests/acceptance/features/bootstrap/Provisioning.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/acceptance/features/bootstrap/Provisioning.php b/tests/acceptance/features/bootstrap/Provisioning.php index e3bd10bba106..5edd8beec012 100644 --- a/tests/acceptance/features/bootstrap/Provisioning.php +++ b/tests/acceptance/features/bootstrap/Provisioning.php @@ -734,6 +734,8 @@ public function createLdapUser(array $setting):void { } if (isset($setting["email"])) { $entry['mail'] = $setting["email"]; + } elseif (OcisHelper::isTestingOnOcis()) { + $entry['mail'] = $userId . '@owncloud.com'; } $entry['gidNumber'] = 5000; $entry['uidNumber'] = $uidNumber;