aboutsummaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-uservice-test/src/test/resources/testdata
diff options
context:
space:
mode:
authorning.xi <ning.xi@est.tech>2019-07-30 00:31:18 +0000
committerning.xi <ning.xi@est.tech>2019-07-30 00:31:18 +0000
commit015691cae16b4c6913cf7caf727011280308ac8b (patch)
tree213955a3143e9834b1c3569a4ec4d517ac26268b /testsuites/integration/integration-uservice-test/src/test/resources/testdata
parent2c6b9c5524c8a0d829555fea2bc685efa8d12085 (diff)
integration test for execution property rest API
Issue-ID: POLICY-1936 Change-Id: Ifc720cd320f5eced2f3c039b2ce6442387de240b Signed-off-by: ning.xi <ning.xi@est.tech>
Diffstat (limited to 'testsuites/integration/integration-uservice-test/src/test/resources/testdata')
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json52
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadUrl.json59
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json59
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json59
-rw-r--r--testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json59
5 files changed, 288 insertions, 0 deletions
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json
new file mode 100644
index 000000000..5da96ae9c
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadHttpCodeFilter.json
@@ -0,0 +1,52 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "target/ExecutionPropertiesRestTestPolicyModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "GetCodeConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/FetchHttpCode",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "[4][0-1][0-9]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON",
+ "parameters": {
+ "testToRun": "FetchHttpCode"
+ }
+ },
+ "eventName": "Event0200"
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "src/test/resources/events/EventsOut.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadUrl.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadUrl.json
new file mode 100644
index 000000000..bec3f9214
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventBadUrl.json
@@ -0,0 +1,59 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "target/ExecutionPropertiesRestTestPolicyModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "GetCodeConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/FetchHttpCode",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON",
+ "parameters": {
+ "testToRun": "FetchHttpCode"
+ }
+ },
+ "eventName": "Event0200"
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/tagId}",
+ "httpMethod": "PUT",
+ "httpHeaders" : [
+ ["Content-Type", "application/json"],
+ ["Date", "Tue, 24 Jul 2019 14:57:12 GMT"]
+ ]
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventName": "Event0201"
+ }
+ }
+}
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json
new file mode 100644
index 000000000..a765fb5b2
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTEventNoValueSetForTag.json
@@ -0,0 +1,59 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "target/ExecutionPropertiesRestTestPolicyModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "GetCodeConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/FetchHttpCode",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON",
+ "parameters": {
+ "testToRun": "FetchHttpCode"
+ }
+ },
+ "eventName": "Event0200"
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/{tagId}/{Number}",
+ "httpMethod": "PUT",
+ "httpHeaders" : [
+ ["Content-Type", "application/json"],
+ ["Date", "Tue, 24 Jul 2019 14:57:12 GMT"]
+ ]
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventName": "Event0201"
+ }
+ }
+}
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json
new file mode 100644
index 000000000..556ca234d
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToMultiTagUrlOK.json
@@ -0,0 +1,59 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "target/ExecutionPropertiesRestTestPolicyModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "GetCodeConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/FetchHttpCode",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON",
+ "parameters": {
+ "testToRun": "FetchHttpCode"
+ }
+ },
+ "eventName": "Event0200"
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/{tagId}/{value}",
+ "httpMethod": "PUT",
+ "httpHeaders" : [
+ ["Content-Type", "application/json"],
+ ["Date", "Tue, 24 Jul 2019 14:57:12 GMT"]
+ ]
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventName": "Event0201"
+ }
+ }
+}
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json
new file mode 100644
index 000000000..455d6f54e
--- /dev/null
+++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/RESTHttpCodeFilterSetToTagUrlOK.json
@@ -0,0 +1,59 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "target/ExecutionPropertiesRestTestPolicyModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "GetCodeConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/FetchHttpCode",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON",
+ "parameters": {
+ "testToRun": "FetchHttpCode"
+ }
+ },
+ "eventName": "Event0200"
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestExecutionRest/apex/event/{tagId}",
+ "httpMethod": "PUT",
+ "httpHeaders" : [
+ ["Content-Type", "application/json"],
+ ["Date", "Tue, 24 Jul 2019 14:57:12 GMT"]
+ ]
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventName": "Event0201"
+ }
+ }
+}