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
@Autowired
PolicyTypes policyTypes;
+ @Autowired
+ ApplicationConfig applicationConfig;
+
static class MockApplicationConfig extends ApplicationConfig {
@Override
public String getLocalConfigurationFilePath() {
}
@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();
}