aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2017-02-03 09:52:54 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-02-06 16:07:41 +0100
commit09e689ec112a163535a98a682c9a10a06e34de00 (patch)
tree18fd5119a10537bc65f575f9d016e0c8996aeb30 /sonar-core
parentdc4b076e6f48f2db09d33b45e96ad703da3bc893 (diff)
downloadsonarqube-09e689ec112a163535a98a682c9a10a06e34de00.tar.gz
sonarqube-09e689ec112a163535a98a682c9a10a06e34de00.zip
SONAR-8208 Remove property "sonar.authenticator.createUser"
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java7
-rw-r--r--sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java25
2 files changed, 6 insertions, 26 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
index 12bbe0a1185..ffac9913d82 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/CorePropertyDefinitions.java
@@ -135,13 +135,6 @@ public class CorePropertyDefinitions {
.defaultValue(String.valueOf(false))
.hidden()
.build(),
- PropertyDefinition.builder(CoreProperties.CORE_AUTHENTICATOR_CREATE_USERS)
- .name("Create user accounts")
- .description("Create accounts when authenticating users via an external system")
- .type(PropertyType.BOOLEAN)
- .defaultValue(String.valueOf(true))
- .hidden()
- .build(),
PropertyDefinition.builder(CoreProperties.CORE_AUTHENTICATOR_IGNORE_STARTUP_FAILURE)
.name("Ignore failures during authenticator startup")
.type(PropertyType.BOOLEAN)
diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
index b1198a6ef83..01f3d1bf9d2 100644
--- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
@@ -19,42 +19,29 @@
*/
package org.sonar.core.config;
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
import java.util.List;
-import javax.annotation.Nonnull;
+import java.util.Optional;
import org.junit.Test;
import org.sonar.api.PropertyType;
import org.sonar.api.config.PropertyDefinition;
-import org.sonar.api.database.DatabaseProperties;
-import static com.google.common.collect.FluentIterable.from;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.sonar.api.database.DatabaseProperties.PROP_PASSWORD;
public class CorePropertyDefinitionsTest {
+
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(63);
+ assertThat(defs).hasSize(62);
}
@Test
public void jdbc_password_property_has_password_type() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- Optional<PropertyDefinition> prop = from(defs).filter(new HasKeyPredicate(DatabaseProperties.PROP_PASSWORD)).first();
+
+ Optional<PropertyDefinition> prop = defs.stream().filter(def -> PROP_PASSWORD.equals(def.key())).findFirst();
assertThat(prop.get().type()).isEqualTo(PropertyType.PASSWORD);
}
- private final class HasKeyPredicate implements Predicate<PropertyDefinition> {
- private final String key;
-
- HasKeyPredicate(String key) {
- this.key = key;
- }
-
- @Override
- public boolean apply(@Nonnull PropertyDefinition input) {
- return key.equals(input.key());
- }
- }
}