aboutsummaryrefslogtreecommitdiffstats
path: root/models-sim/policy-models-simulators/src/test/resources
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-10-05 11:31:40 -0400
committerJim Hahn <jrh3@att.com>2020-10-05 11:37:56 -0400
commit66cce3f7afce095871b339440f7816389ddc614a (patch)
treebe135336b8e87f63d2f14cb3a669e5bf97630afa /models-sim/policy-models-simulators/src/test/resources
parentc48e63f81e072c3cdf3f3fe84983285c0b8f1439 (diff)
Make simulator parameters optional
Modified the simulator to make the DMaaP and GRPC parameters optional so that a simulator can be started without them. Also added parameter validation, as that was not being performed on the DMaaP or GRPC parameters. Also modified the validation so-as not to require the rest server parameter field contained within the DMaaP parameter class. Issue-ID: POLICY-2858 Change-Id: I85dde93c7baf863eca2cb10eab37806f3e08a087 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-sim/policy-models-simulators/src/test/resources')
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/invalidDmaapParameters.json7
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/invalidGrpcParameters.json7
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/invalidSimParameters.json2
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/minParameters.json14
-rw-r--r--models-sim/policy-models-simulators/src/test/resources/simParameters.json5
5 files changed, 29 insertions, 6 deletions
diff --git a/models-sim/policy-models-simulators/src/test/resources/invalidDmaapParameters.json b/models-sim/policy-models-simulators/src/test/resources/invalidDmaapParameters.json
new file mode 100644
index 000000000..ff6790144
--- /dev/null
+++ b/models-sim/policy-models-simulators/src/test/resources/invalidDmaapParameters.json
@@ -0,0 +1,7 @@
+{
+ "dmaapProvider": {},
+ "restServers": [],
+ "topicSinks": [],
+ "topicSources": [],
+ "topicServers": []
+}
diff --git a/models-sim/policy-models-simulators/src/test/resources/invalidGrpcParameters.json b/models-sim/policy-models-simulators/src/test/resources/invalidGrpcParameters.json
new file mode 100644
index 000000000..86e425364
--- /dev/null
+++ b/models-sim/policy-models-simulators/src/test/resources/invalidGrpcParameters.json
@@ -0,0 +1,7 @@
+{
+ "grpcServer": {},
+ "restServers": [],
+ "topicSinks": [],
+ "topicSources": [],
+ "topicServers": []
+}
diff --git a/models-sim/policy-models-simulators/src/test/resources/invalidSimParameters.json b/models-sim/policy-models-simulators/src/test/resources/invalidSimParameters.json
deleted file mode 100644
index 2c63c0851..000000000
--- a/models-sim/policy-models-simulators/src/test/resources/invalidSimParameters.json
+++ /dev/null
@@ -1,2 +0,0 @@
-{
-}
diff --git a/models-sim/policy-models-simulators/src/test/resources/minParameters.json b/models-sim/policy-models-simulators/src/test/resources/minParameters.json
new file mode 100644
index 000000000..c7ea49874
--- /dev/null
+++ b/models-sim/policy-models-simulators/src/test/resources/minParameters.json
@@ -0,0 +1,14 @@
+{
+ "restServers": [
+ {
+ "name": "A&AI simulator",
+ "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs",
+ "host": "localhost",
+ "port": 6766,
+ "https": true
+ }
+ ],
+ "topicSinks": [],
+ "topicSources": [],
+ "topicServers": []
+}
diff --git a/models-sim/policy-models-simulators/src/test/resources/simParameters.json b/models-sim/policy-models-simulators/src/test/resources/simParameters.json
index 1d1c0aad7..df8de6ff7 100644
--- a/models-sim/policy-models-simulators/src/test/resources/simParameters.json
+++ b/models-sim/policy-models-simulators/src/test/resources/simParameters.json
@@ -1,10 +1,7 @@
{
"dmaapProvider": {
"name": "DMaaP simulator",
- "topicSweepSec": 300,
- "restServerParameters": {
-
- }
+ "topicSweepSec": 300
},
"restServers": [
{