aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-auth-gitlab
diff options
context:
space:
mode:
authorMichal Duda <michal.duda@sonarsource.com>2020-04-08 19:38:02 +0200
committersonartech <sonartech@sonarsource.com>2020-04-14 20:04:04 +0000
commitd662d0c0269e1a12da0c3ecdb8f9d33b765ccdcc (patch)
tree7ec6d738cc8516bf42f42552a64f1cdbb0307a37 /server/sonar-auth-gitlab
parentab6328a769fbe531464fc9dd77cc64efc72ba390 (diff)
downloadsonarqube-d662d0c0269e1a12da0c3ecdb8f9d33b765ccdcc.tar.gz
sonarqube-d662d0c0269e1a12da0c3ecdb8f9d33b765ccdcc.zip
SONAR-13272 fix issue with setting some properties through env variables
Diffstat (limited to 'server/sonar-auth-gitlab')
-rw-r--r--server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GitLabSettingsTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GitLabSettingsTest.java b/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GitLabSettingsTest.java
index 0517f0e55c9..523594dc7dc 100644
--- a/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GitLabSettingsTest.java
+++ b/server/sonar-auth-gitlab/src/test/java/org/sonar/auth/gitlab/GitLabSettingsTest.java
@@ -25,6 +25,7 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.internal.MapSettings;
+import org.sonar.api.utils.System2;
import static org.assertj.core.api.Assertions.assertThat;
import static org.sonar.auth.gitlab.GitLabSettings.GITLAB_AUTH_ALLOW_USERS_TO_SIGNUP;
@@ -44,7 +45,7 @@ public class GitLabSettingsTest {
@Before
public void prepare() {
- settings = new MapSettings(new PropertyDefinitions(GitLabSettings.definitions()));
+ settings = new MapSettings(new PropertyDefinitions(System2.INSTANCE, GitLabSettings.definitions()));
config = new GitLabSettings(settings.asConfig());
}
@@ -55,7 +56,6 @@ public class GitLabSettingsTest {
settings.setProperty(GITLAB_AUTH_URL, "https://gitlab.com/api/");
assertThat(config.url()).isEqualTo("https://gitlab.com/api");
-
settings.setProperty(GITLAB_AUTH_URL, "https://gitlab.com/api");
assertThat(config.url()).isEqualTo("https://gitlab.com/api");