aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-auth-saml/src
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-saml/src
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-saml/src')
-rw-r--r--server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlIdentityProviderTest.java5
-rw-r--r--server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlSettingsTest.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlIdentityProviderTest.java b/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlIdentityProviderTest.java
index 6f285db5456..58f3e87a0ab 100644
--- a/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlIdentityProviderTest.java
+++ b/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlIdentityProviderTest.java
@@ -27,15 +27,16 @@ import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.io.IOUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.config.PropertyDefinitions;
import org.sonar.api.config.internal.MapSettings;
-import org.apache.commons.io.IOUtils;
import org.sonar.api.server.authentication.OAuth2IdentityProvider;
import org.sonar.api.server.authentication.UnauthorizedException;
import org.sonar.api.server.authentication.UserIdentity;
+import org.sonar.api.utils.System2;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.anyString;
@@ -48,7 +49,7 @@ public class SamlIdentityProviderTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
- private MapSettings settings = new MapSettings(new PropertyDefinitions(SamlSettings.definitions()));
+ private MapSettings settings = new MapSettings(new PropertyDefinitions(System2.INSTANCE, SamlSettings.definitions()));
private SamlIdentityProvider underTest = new SamlIdentityProvider(new SamlSettings(settings.asConfig()));
diff --git a/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlSettingsTest.java b/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlSettingsTest.java
index b0cdf4e4539..5968416ea3a 100644
--- a/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlSettingsTest.java
+++ b/server/sonar-auth-saml/src/test/java/org/sonar/auth/saml/SamlSettingsTest.java
@@ -28,6 +28,7 @@ import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
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;
@@ -37,7 +38,7 @@ public class SamlSettingsTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
- private MapSettings settings = new MapSettings(new PropertyDefinitions(SamlSettings.definitions()));
+ private MapSettings settings = new MapSettings(new PropertyDefinitions(System2.INSTANCE, SamlSettings.definitions()));
private SamlSettings underTest = new SamlSettings(settings.asConfig());