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=d37a2be4eca701f7a61a56fd96c3c5ff4d688d02;hb=2310d1c6a458bd12b2d1ff805f1bd12dcd536cfa;hp=d8a971840dab97a55510e35829f56ae1130219ef;hpb=0b10c7fa768f05ae5146ce2f3a69998bb8f97a9f;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 d8a97184..d37a2be4 100644 --- a/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java +++ b/policy-agent/src/test/java/org/oransc/policyagent/MockPolicyAgent.java @@ -55,7 +55,7 @@ import org.springframework.util.StringUtils; @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT) -public class MockPolicyAgent { +class MockPolicyAgent { private static final Logger logger = LoggerFactory.getLogger(MockPolicyAgent.class); @Autowired @@ -67,6 +67,9 @@ public class MockPolicyAgent { @Autowired PolicyTypes policyTypes; + @Autowired + ApplicationConfig applicationConfig; + static class MockApplicationConfig extends ApplicationConfig { @Override public String getLocalConfigurationFilePath() { @@ -183,6 +186,7 @@ public class MockPolicyAgent { .ric(ric) // .type(unnamedPolicyType) // .lastModified("now") // + .isTransient(false) // .build(); this.policies.put(policy); } @@ -194,9 +198,9 @@ 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 { + @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. + void runMock() throws Exception { keepServerAlive(); }