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>
diff --git a/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore b/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore
deleted file mode 100644
index b95e010..0000000
--- a/models-sim/models-sim-dmaap/src/main/resources/etc/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore b/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e010..0000000
--- a/models-sim/packages/models-simulator-tarball/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore b/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e010..0000000
--- a/models-sim/policy-models-sim-pdp/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
diff --git a/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore b/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore
deleted file mode 100644
index b95e010..0000000
--- a/models-sim/policy-models-simulators/src/main/resources/ssl/policy-keystore
+++ /dev/null
Binary files differ
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 bb4fa7c..e1517f3 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.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.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 @@
* 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 @@
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
deleted file mode 100644
index 5820e0f..0000000
--- a/models-sim/policy-models-simulators/src/test/resources/keystore-test
+++ /dev/null
Binary files differ