aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-10-29 18:51:33 +0100
committerJoas Schilling <coding@schilljs.com>2024-01-26 13:53:34 +0100
commit52cc18efc0baa916b23350fe5fbb0b0081af5def (patch)
treec7f2760679e0b14189396af7ce3c44f574065857 /build/integration/features/bootstrap
parentb64d03279586c0b26ca73818e9d5110176d8ae7b (diff)
downloadnextcloud-server-52cc18efc0baa916b23350fe5fbb0b0081af5def.tar.gz
nextcloud-server-52cc18efc0baa916b23350fe5fbb0b0081af5def.zip
fix(tests): Ensure ldap server can be reached in integration tests on GitHub Actions and other improvments
* Run integration tests for every pull request * Also print docker logs of service containers (ldap, redis) * Ensure consistent `datadir` for test assertions * Test openldap features separatly * Only the LDAP tests rely on `/dev/shm` while `federated.feature` rely on real directory access Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/LDAPContext.php5
1 files changed, 4 insertions, 1 deletions
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));