X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=policy-agent%2Fsrc%2Ftest%2Fjava%2Forg%2Foransc%2Fpolicyagent%2FMockPolicyAgent.java;h=f42a631f81bba16dd08974293e118d4520f665d1;hb=964a97cbe18f38e8417366dfdf871fcfae908fc8;hp=7f57ceb206af839fc0e8297afc3a33ac2970df53;hpb=6d503afd38bdf9823bda3dfe3d307adaeb6f7eee;p=nonrtric.git diff --git a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java index 7f57ceb2..f42a631f 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java @@ -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(); }