diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/config/behat.yml | 20 | ||||
-rw-r--r-- | build/integration/features/bootstrap/LDAPContext.php | 5 | ||||
-rw-r--r-- | build/integration/openldap_features/openldap-uid-username.feature (renamed from build/integration/ldap_features/openldap-uid-username.feature) | 0 | ||||
-rw-r--r-- | build/integration/openldap_numerical_features/openldap-numerical-id.feature (renamed from build/integration/ldap_features/openldap-numerical-id.feature) | 0 |
4 files changed, 24 insertions, 1 deletions
diff --git a/build/integration/config/behat.yml b/build/integration/config/behat.yml index 080752a3d6f..8401b841cdd 100644 --- a/build/integration/config/behat.yml +++ b/build/integration/config/behat.yml @@ -192,6 +192,26 @@ default: - admin - admin regular_user_password: 123456 + openldap_numerical: + paths: + - "%paths.base%/../openldap_numerical_features" + contexts: + - LDAPContext: + baseUrl: http://localhost:8080 + admin: + - admin + - admin + regular_user_password: 123456 + openldap: + paths: + - "%paths.base%/../openldap_features" + contexts: + - LDAPContext: + baseUrl: http://localhost:8080 + admin: + - admin + - admin + regular_user_password: 123456 remoteapi: paths: - "%paths.base%/../remoteapi_features" diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php index e0315bce84e..fd4a448b5e9 100644 --- a/build/integration/features/bootstrap/LDAPContext.php +++ b/build/integration/features/bootstrap/LDAPContext.php @@ -104,7 +104,7 @@ class LDAPContext implements Context { $this->asAn('admin'); $this->creatingAnLDAPConfigurationAt('/apps/user_ldap/api/v1/config'); $data = new TableNode([ - ['configData[ldapHost]', 'openldap'], + ['configData[ldapHost]', getenv('LDAP_HOST') ?: 'openldap'], ['configData[ldapPort]', '389'], ['configData[ldapBase]', 'dc=nextcloud,dc=ci'], ['configData[ldapAgentName]', 'cn=admin,dc=nextcloud,dc=ci'], @@ -141,6 +141,9 @@ class LDAPContext implements Context { $this->asAn('admin'); $configData = $table->getRows(); foreach ($configData as &$row) { + if (str_contains($row[0], 'Host') && getenv('LDAP_HOST')) { + $row[1] = str_replace('openldap', getenv('LDAP_HOST'), $row[1]); + } $row[0] = 'configData[' . $row[0] . ']'; } $this->settingTheLDAPConfigurationTo(new TableNode($configData)); diff --git a/build/integration/ldap_features/openldap-uid-username.feature b/build/integration/openldap_features/openldap-uid-username.feature index 6793273e8c7..6793273e8c7 100644 --- a/build/integration/ldap_features/openldap-uid-username.feature +++ b/build/integration/openldap_features/openldap-uid-username.feature diff --git a/build/integration/ldap_features/openldap-numerical-id.feature b/build/integration/openldap_numerical_features/openldap-numerical-id.feature index 75eb6827192..75eb6827192 100644 --- a/build/integration/ldap_features/openldap-numerical-id.feature +++ b/build/integration/openldap_numerical_features/openldap-numerical-id.feature |