Merge "Added STD sim 2.0.0 tests"
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / MockPolicyAgent.java
index 7f57ceb..f42a631 100644 (file)
@@ -50,12 +50,17 @@ import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
 import org.springframework.boot.test.context.TestConfiguration;
 import org.springframework.boot.web.server.LocalServerPort;
 import org.springframework.context.annotation.Bean;
+import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit.jupiter.SpringExtension;
 import org.springframework.util.StringUtils;
 
 @ExtendWith(SpringExtension.class)
 @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
-public class MockPolicyAgent {
+@TestPropertySource(
+    properties = { //
+        "server.ssl.key-store=./config/keystore.jks", //
+        "app.webclient.trust-store=./config/truststore.jks"})
+class MockPolicyAgent {
     private static final Logger logger = LoggerFactory.getLogger(MockPolicyAgent.class);
 
     @Autowired
@@ -199,9 +204,8 @@ public class MockPolicyAgent {
 
     @Test
     @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server
-                                     // alive,
-                                     // so it will only be confusing to add an assertion.
-    public void runMock() throws Exception {
+                                     // alive, so it will only be confusing to add an assertion.
+    void runMock() throws Exception {
         keepServerAlive();
     }