diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-10-18 14:29:59 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-10-18 14:29:59 +0200 |
commit | 7a3084fa7d00fc77bc286ca0a487b14d31f919e8 (patch) | |
tree | e5ac43ef683a64fbd502d57447bd41c6f0cf940a /aai-resources/src/test | |
parent | a24b9261f0f5b990ef2b0b79feb0ae052a43520f (diff) |
Update spring-boot to 2.2
- update spring-boot to latest available 2.2.X release
- pom inheritance via aai-parent pom makes it necessary to also explicitly specify spring framework versions
- replace deprecations around Profiles
Issue-ID: AAI-3665
Change-Id: I74b22a76ef14217b888ae6bb12cb83d86f9e4241
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-resources/src/test')
-rw-r--r-- | aai-resources/src/test/java/org/onap/aai/ResourcesTestConfiguration.java | 5 | ||||
-rw-r--r-- | aai-resources/src/test/resources/application-test.properties | 3 |
2 files changed, 4 insertions, 4 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); } diff --git a/aai-resources/src/test/resources/application-test.properties b/aai-resources/src/test/resources/application-test.properties index e228229..4c2b8d0 100644 --- a/aai-resources/src/test/resources/application-test.properties +++ b/aai-resources/src/test/resources/application-test.properties @@ -30,7 +30,6 @@ server.local.startpath=src/main/resources/ server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties server.port=8447 -security.require-ssl=false server.ssl.enabled=false #server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 #server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore @@ -77,5 +76,5 @@ schema.translator.list=config management.server.port=0 management.endpoints.enabled-by-default=true management.endpoints.web.exposure.include=info, health, prometheus -management.metrics.web.server.auto-time-requests=false +management.metrics.web.server.request.autotime.enabled=false scrape.uri.metrics=true |