From f72330be756a47260c319b0757d137767e0c11ab Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Wed, 16 Feb 2022 09:51:34 +0100 Subject: [PATCH] Fix Sonar issues Issue-ID: NONRTRIC-717 Signed-off-by: elinuxhenrik Change-Id: I656464ecf49bfe3e5c6680b61bfc8f714e2476a9 --- src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java b/src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java index 8a66e14..642ca70 100644 --- a/src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java +++ b/src/test/java/org/oransc/rappcatalogue/HttpsRequestTest.java @@ -53,7 +53,7 @@ import org.springframework.web.client.ResourceAccessException; properties = { // "server.ssl.key-store=./config/r-app-catalogue-keystore.jks", // "server.http-port=0"}) -public class HttpsRequestTest { +class HttpsRequestTest { @Value("${server.ssl.key-store-password}") private String keyStorePassword; // inject password from config @@ -68,12 +68,12 @@ public class HttpsRequestTest { private AbstractConfigurableWebServerFactory webServerFactory; @Test - public void testSsl() { + void testSsl() { assertEquals(true, this.webServerFactory.getSsl().isEnabled()); } @Test - public void rest_OverPlainHttp_GetsBadRequestRequiresTLS() throws Exception { + void rest_OverPlainHttp_GetsBadRequestRequiresTLS() throws Exception { TestRestTemplate template = new TestRestTemplate(); ResponseEntity responseEntity = template.getForEntity("http://localhost:" + port + "/services", String.class); @@ -82,7 +82,7 @@ public class HttpsRequestTest { } @Test - public void rest_WithoutSSLConfiguration_ThrowsSSLExceptionUnableFindValidCertPath() throws Exception { + void rest_WithoutSSLConfiguration_ThrowsSSLExceptionUnableFindValidCertPath() throws Exception { TestRestTemplate template = new TestRestTemplate(); ResourceAccessException thrown = assertThrows(ResourceAccessException.class, () -> { @@ -92,7 +92,7 @@ public class HttpsRequestTest { } @Test - public void rest_WithTwoWaySSL_AuthenticatesAndGetsExpectedResponse() throws Exception { + void rest_WithTwoWaySSL_AuthenticatesAndGetsExpectedResponse() throws Exception { SSLContext sslContext = new SSLContextBuilder().loadKeyMaterial(ResourceUtils.getFile(keyStore), keyStorePassword.toCharArray(), keyStorePassword.toCharArray()).build(); -- 2.16.6