summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/LDAPContext.php13
-rw-r--r--build/integration/ldap_features/ldap-openldap.feature27
2 files changed, 40 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php
index 4b9810aeff7..ce63bc3f698 100644
--- a/build/integration/features/bootstrap/LDAPContext.php
+++ b/build/integration/features/bootstrap/LDAPContext.php
@@ -155,4 +155,17 @@ class LDAPContext implements Context {
}
}
}
+
+ /**
+ * @Given /^Expect ServerException on failed web login as "([^"]*)"$/
+ */
+ public function expectServerExceptionOnFailedWebLoginAs($login) {
+ try {
+ $this->loggingInUsingWebAs($login);
+ } catch (\GuzzleHttp\Exception\ServerException $e) {
+ PHPUnit_Framework_Assert::assertEquals(500, $e->getResponse()->getStatusCode());
+ return;
+ }
+ PHPUnit_Framework_Assert::assertTrue(false, 'expected Exception not received');
+ }
}
diff --git a/build/integration/ldap_features/ldap-openldap.feature b/build/integration/ldap_features/ldap-openldap.feature
index a2b16950bb1..b56f9eb2cae 100644
--- a/build/integration/ldap_features/ldap-openldap.feature
+++ b/build/integration/ldap_features/ldap-openldap.feature
@@ -58,3 +58,30 @@ Feature: LDAP
| BlueGroup | 1 |
| PurpleGroup | 1 |
| SquareGroup | 0 |
+
+ Scenario: Test backup server
+ Given having a valid LDAP configuration
+ And modify LDAP configuration
+ | ldapBackupHost | openldap |
+ | ldapBackupPort | 389 |
+ | ldapHost | foo.bar |
+ | ldapPort | 2456 |
+ And Logging in using web as "alice"
+ Then the HTTP status code should be "200"
+
+ Scenario: Test backup server offline
+ Given having a valid LDAP configuration
+ And modify LDAP configuration
+ | ldapBackupHost | off.line |
+ | ldapBackupPort | 3892 |
+ | ldapHost | foo.bar |
+ | ldapPort | 2456 |
+ Then Expect ServerException on failed web login as "alice"
+
+ Scenario: Test LDAP server offline, no backup server
+ Given having a valid LDAP configuration
+ And modify LDAP configuration
+ | ldapHost | foo.bar |
+ | ldapPort | 2456 |
+ Then Expect ServerException on failed web login as "alice"
+