diff options
Diffstat (limited to 'testsuites/integration/integration-uservice-test/src/test/resources/testdata')
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" + } + } +} |