From adf67497761295115dc75b525500d687518fc4fd Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 10 Jul 2019 19:44:39 +0000 Subject: Add integration tests for executor properties Added integration test that sets properties in a dummy plugin and amends them in tasks in a policy. Variosu tests added to check combinations of where properties are set in plugins or in tasks or both. Implementaiton changed to: - Always pass in a Properies object, the properties object coming into the policy cannot be null because the task/TSL/SFL may wish to set it - Fix a bug where the properties were not passed from the ApexEvent to the engine event in the ApexEventUnmarshaller class Issue-ID: POLICY-1743 Change-Id: I6aa152b28d46cf3cc6fa56a1a95b76a8e55f5a49 Signed-off-by: liamfallon --- .../executionproperties/definedToEmpty_conf.json | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json (limited to 'testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json') diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json new file mode 100644 index 000000000..ec96b5cc4 --- /dev/null +++ b/testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json @@ -0,0 +1,48 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 4, + "deploymentPort": 12561, + "policyModelFileName": "ExecutionPropertiesTestPolicyModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" + } + } + } + }, + "eventInputParameters": { + "FirstConsumer": { + "carrierTechnologyParameters": { + "carrierTechnology": "DUMMY", + "parameterClassName": "org.onap.policy.apex.testsuites.integration.uservice.executionproperties.DummyCarrierTechnologyParameters", + "parameters": { + "testToRun": "DefinedToEmpty", + "propertyFileName": "src/test/resources/testdata/executionproperties/definedToEmpty_in.properties" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "eventName": "RunTestEvent" + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "DUMMY", + "parameterClassName": "org.onap.policy.apex.testsuites.integration.uservice.executionproperties.DummyCarrierTechnologyParameters", + "parameters": { + "testToRun": "DefinedToEmpty", + "propertyFileName": "target/definedToEmpty_out.properties" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + } + } +} -- cgit 1.2.3-korg