summaryrefslogtreecommitdiffstats
path: root/build/integration/features
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-03-15 18:39:27 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-08-09 23:45:04 +0200
commit86d145f0692df7b6d5883c6caa88c19b7d725161 (patch)
tree51b5ea121fe4d619337870c8ea2453761f615ff1 /build/integration/features
parentf630b12fc78c2201504fc14a2b8dec2c610655b2 (diff)
downloadnextcloud-server-86d145f0692df7b6d5883c6caa88c19b7d725161.tar.gz
nextcloud-server-86d145f0692df7b6d5883c6caa88c19b7d725161.zip
behat integration tests for LDAP, basic setup
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'build/integration/features')
-rw-r--r--build/integration/features/bootstrap/LDAPContext.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php
index e2b30011515..5d7bb34a90a 100644
--- a/build/integration/features/bootstrap/LDAPContext.php
+++ b/build/integration/features/bootstrap/LDAPContext.php
@@ -82,4 +82,26 @@ class LDAPContext implements Context {
public function settingTheLDAPConfigurationTo(TableNode $configData) {
$this->sendingToWith('PUT', $this->apiUrl . '/' . $this->configID, $configData);
}
+
+ /**
+ * @Given /^having a valid LDAP configuration$/
+ */
+ public function havingAValidLDAPConfiguration() {
+ $this->asAn('admin');
+ $this->creatingAnLDAPConfigurationAt('/apps/user_ldap/api/v1/config');
+ $data = new TableNode([
+ ['configData[ldapHost]', 'openldap'],
+ ['configData[ldapPort]', '389'],
+ ['configData[ldapBase]', 'dc=nextcloud,dc=ci'],
+ ['configData[ldapAgentName]', 'cn=admin,dc=nextcloud,dc=ci'],
+ ['configData[ldapAgentPassword]', 'admin'],
+ ['configData[ldapUserFilter]', '(&(objectclass=inetorgperson))'],
+ ['configData[ldapLoginFilter]', '(&(objectclass=inetorgperson)(uid=%uid))'],
+ ['configData[ldapUserDisplayName]', 'displayname'],
+ ['configData[ldapEmailAttribute]', 'mail'],
+ ['configData[ldapConfigurationActive]', '1'],
+ ]);
+ $this->settingTheLDAPConfigurationTo($data);
+ $this->asAn('');
+ }
}