diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2022-02-14 11:11:11 +0000 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@bell.ca> | 2022-03-01 11:05:24 +0000 |
commit | 411a7aa191a48170336dfa0fc5c44a17f99fd186 (patch) | |
tree | d2ffd185a75768b1ef5f2b2cda0e58015a76053c /main/src/test/java | |
parent | 98aed0d3f60be26df2cc0dc86d368a615df59978 (diff) |
Fix swagger and improve exception handling
1) Swagger was getting generated in a different format
due to a serialization isue. It is fixed.
2) Improved exception handling by taking care of any exceptions
that could occur in and around database operations.
3) AAF enabling/disabling was done using spring profiles.
This is changed to using parameters, as it is more easier to configure
in an OOM helm chart deployment
Change-Id: If1bee01379ba5c4efac29822662896d8aa883fc8
Issue-ID: POLICY-3975
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'main/src/test/java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java index c2d9f038..fd4bb742 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java @@ -51,11 +51,11 @@ import org.onap.policy.common.gson.GsonMessageBodyHandler; import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.common.utils.security.SelfSignedKeyStore; import org.onap.policy.common.utils.services.Registry; +import org.onap.policy.pap.main.PapConstants; import org.onap.policy.pap.main.PolicyPapApplication; import org.onap.policy.pap.main.parameters.CommonTestData; import org.onap.policy.pap.main.startstop.PapActivator; import org.powermock.reflect.Whitebox; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.web.server.LocalServerPort; import org.springframework.test.annotation.DirtiesContext; @@ -91,7 +91,6 @@ public abstract class CommonPapRestServer { @LocalServerPort private int port; - @Autowired private PapActivator papActivator; /** @@ -126,6 +125,7 @@ public abstract class CommonPapRestServer { @Before public void setUp() throws Exception { httpsPrefix = "https://localhost:" + port + "/"; + papActivator = Registry.get(PapConstants.REG_PAP_ACTIVATOR, PapActivator.class); activatorWasAlive = papActivator.isAlive(); } |