diff options
author | 2020-02-27 17:00:08 +0000 | |
---|---|---|
committer | 2020-02-27 17:00:08 +0000 | |
commit | 27dcbd57cc04c45ba85ff6f4008ef2c1d8f7c050 (patch) | |
tree | a6585fc760b1badee4ef0bcc947e59240211efb3 /testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters | |
parent | d1a3d4f7fc8f754937f10e320389825316662b2d (diff) | |
parent | 6ddf46e995be34cc03d92a41948e14dfc5c9f4f9 (diff) |
Merge "Add integration tests for Parameter passing in APEX"
Diffstat (limited to 'testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters')
3 files changed, 262 insertions, 0 deletions
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_invalidTaskIds.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_invalidTaskIds.json new file mode 100644 index 000000000..0714f4b37 --- /dev/null +++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_invalidTaskIds.json @@ -0,0 +1,88 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 1, + "deploymentPort": 12561, + "policyModelFileName": "target/TaskParametersTestPolicyModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + }, + "taskParameters": [ + { + "key": "serviceId", + "value": "serviceId123", + "taskId": "InvalidTaskId:1.0.0" + }, + { + "key": "closedLoopId", + "value": "closedLoopId123", + "taskId": "InvalidTaskIdForCLOutTask" + } + ] + } }, + "eventInputParameters": { + "GetCodeConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/event/GetEvent", + "httpMethod": "GET" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventName": "CLTriggerEvent" + }, + "FirstConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/service/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstProducer" + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstConsumer" + }, + "SecondProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/action/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "CLOutputEvent" + } + } +} diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_noTaskIds.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_noTaskIds.json new file mode 100644 index 000000000..217d6bda2 --- /dev/null +++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_noTaskIds.json @@ -0,0 +1,86 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 1, + "deploymentPort": 12561, + "policyModelFileName": "target/TaskParametersTestPolicyModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + }, + "taskParameters": [ + { + "key": "serviceId", + "value": "serviceId123" + }, + { + "key": "closedLoopId", + "value": "closedLoopId123" + } + ] + } }, + "eventInputParameters": { + "GetCodeConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/event/GetEvent", + "httpMethod": "GET" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventName": "CLTriggerEvent" + }, + "FirstConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/service/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstProducer" + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstConsumer" + }, + "SecondProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/action/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "CLOutputEvent" + } + } +} diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_validTaskIds.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_validTaskIds.json new file mode 100644 index 000000000..0029374f9 --- /dev/null +++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/taskparameters/TaskParameterTestConfig_with_validTaskIds.json @@ -0,0 +1,88 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 1, + "deploymentPort": 12561, + "policyModelFileName": "target/TaskParametersTestPolicyModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + }, + "taskParameters": [ + { + "key": "serviceId", + "value": "serviceIdxyz", + "taskId": "SetServiceIdForTest:1.0.0" + }, + { + "key": "closedLoopId", + "value": "closedLoopIdxyz", + "taskId": "SetControlLoopNameForTest:1.0.0" + } + ] + } }, + "eventInputParameters": { + "GetCodeConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/event/GetEvent", + "httpMethod": "GET" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventName": "CLTriggerEvent" + }, + "FirstConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/service/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstProducer" + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTREQUESTOR", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "ServiceInfoEvent", + "requestorMode": true, + "requestorPeer": "FirstConsumer" + }, + "SecondProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "RESTCLIENT", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters", + "parameters": { + "url": "http://localhost:32801/TestTaskParametersRest/apex/action/{tagId}/{value}", + "httpMethod": "POST" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventNameFilter": "CLOutputEvent" + } + } +} |