From 24ef41454c59ebd17b2fceb336c2a690a854377b Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Sun, 12 Aug 2018 23:12:42 +0200 Subject: [PATCH] don't add new LDAP configs if one is already present Signed-off-by: Arthur Schiwon --- build/integration/features/bootstrap/LDAPContext.php | 9 ++++++++- .../ldap_features/openldap-uid-username.feature | 1 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build/integration/features/bootstrap/LDAPContext.php b/build/integration/features/bootstrap/LDAPContext.php index 671dab3767..ee7acab6f5 100644 --- a/build/integration/features/bootstrap/LDAPContext.php +++ b/build/integration/features/bootstrap/LDAPContext.php @@ -32,6 +32,14 @@ class LDAPContext implements Context { protected $apiUrl; + /** @AfterScenario */ + public function teardown() { + if($this->configID === null) { + return; + } + $this->sendingTo('DELETE', $this->apiUrl . '/' . $this->configID); + } + /** * @Given /^the response should contain a tag "([^"]*)"$/ */ @@ -173,7 +181,6 @@ class LDAPContext implements Context { $uidsFound++; } } - error_log('result array ' . json_encode($extractedIDsArray)); ## TODO remove debug statement Assert::assertSame((int)$expectedCount, $uidsFound); } diff --git a/build/integration/ldap_features/openldap-uid-username.feature b/build/integration/ldap_features/openldap-uid-username.feature index f01c779500..d267870ca2 100644 --- a/build/integration/ldap_features/openldap-uid-username.feature +++ b/build/integration/ldap_features/openldap-uid-username.feature @@ -75,7 +75,6 @@ Feature: LDAP Given modify LDAP configuration | ldapBaseUsers | ou=PagingTest,dc=nextcloud,dc=ci | | ldapPagingSize | 2 | - | ldapCacheTTL | 0 | And As an "admin" And sending "GET" to "/cloud/users?limit=10&offset=2" Then the OCS status code should be "200"