diff options
author | Jim Hahn <jrh3@att.com> | 2021-03-19 13:08:02 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-03-19 13:37:37 -0400 |
commit | a247d7b2c29b1422e0025b63529b3a92dc8aa551 (patch) | |
tree | ebea611d94c605e6cb8dc4d8542453b37b13ddba /models-sim/policy-models-simulators/src/test | |
parent | 28d3d6e8e95f450a6d2a03c74614bbaef50fb410 (diff) |
Delete keystores from models
The Keystores are no longer needed in the tarballs, as they are supplied
externally by the CSITs and Helm charts. Deleted those files.
Also modified the junits to use utils-test to generate keystores at
runtime, thus deleted the junit keystore file, too.
Issue-ID: POLICY-3143
Change-Id: Idd24b735a908476765d40bdcb5c741257edc7bb6
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/policy-models-simulators/src/test')
2 files changed, 10 insertions, 5 deletions
diff --git a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java index bb4fa7c5a..e1517f3a8 100644 --- a/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java +++ b/models-sim/policy-models-simulators/src/test/java/org/onap/policy/models/simulators/MainTest.java @@ -31,6 +31,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.io.FileNotFoundException; +import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -52,6 +53,7 @@ import org.onap.policy.common.endpoints.http.server.internal.JettyJerseyServer; import org.onap.policy.common.utils.coder.Coder; import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.network.NetworkUtil; +import org.onap.policy.common.utils.security.SelfSignedKeyStore; public class MainTest { private static final String PARAMETER_FILE = "simParameters.json"; @@ -64,7 +66,7 @@ public class MainTest { * Saves system properties. */ @BeforeClass - public static void setUpBeforeClass() { + public static void setUpBeforeClass() throws IOException, InterruptedException { savedValues = new HashMap<>(); for (String prop : List.of(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME, @@ -75,11 +77,14 @@ public class MainTest { savedValues.put(prop, System.getProperty(prop)); } - System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PROPERTY_NAME, "src/test/resources/keystore-test"); - System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME, "kstest"); + System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PROPERTY_NAME, new SelfSignedKeyStore().getKeystoreName()); + System.setProperty(JettyJerseyServer.SYSTEM_KEYSTORE_PASSWORD_PROPERTY_NAME, + SelfSignedKeyStore.KEYSTORE_PASSWORD); - System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PROPERTY_NAME, "src/test/resources/keystore-test"); - System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME, "kstest"); + System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PROPERTY_NAME, + "src/main/resources/ssl/policy-truststore"); + System.setProperty(JettyJerseyServer.SYSTEM_TRUSTSTORE_PASSWORD_PROPERTY_NAME, + SelfSignedKeyStore.KEYSTORE_PASSWORD); } /** diff --git a/models-sim/policy-models-simulators/src/test/resources/keystore-test b/models-sim/policy-models-simulators/src/test/resources/keystore-test Binary files differdeleted file mode 100644 index 5820e0f0c..000000000 --- a/models-sim/policy-models-simulators/src/test/resources/keystore-test +++ /dev/null |