diff options
Diffstat (limited to 'aai-resources/src/test/java')
-rw-r--r-- | aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java b/aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java index 7e91341..93b1519 100644 --- a/aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java +++ b/aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java @@ -38,6 +38,7 @@ import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.core.env.Environment; +import org.springframework.core.env.Profiles; import org.springframework.http.HttpStatus; import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; @@ -61,7 +62,7 @@ public class ResourcesTestConfiguration { RestTemplate restTemplate(RestTemplateBuilder builder) throws Exception { RestTemplate restTemplate = null; - if (env.acceptsProfiles("one-way-ssl", "two-way-ssl")) { + if (env.acceptsProfiles(Profiles.of(ResourcesProfiles.TWO_WAY_SSL, ResourcesProfiles.ONE_WAY_SSL))) { char[] trustStorePassword = env.getProperty("server.ssl.trust-store-password").toCharArray(); char[] keyStorePassword = env.getProperty("server.ssl.key-store-password").toCharArray(); @@ -69,7 +70,7 @@ public class ResourcesTestConfiguration { String trustStore = env.getProperty("server.ssl.trust-store"); SSLContextBuilder sslContextBuilder = SSLContextBuilder.create(); - if (env.acceptsProfiles("two-way-ssl")) { + if (env.acceptsProfiles(Profiles.of(ResourcesProfiles.TWO_WAY_SSL))) { sslContextBuilder = sslContextBuilder.loadKeyMaterial(loadPfx(keyStore, keyStorePassword), keyStorePassword); } |