Add integration tests for executor properties 58/91158/5
authorliamfallon <liam.fallon@est.tech>
Wed, 10 Jul 2019 19:44:39 +0000 (19:44 +0000)
committerliamfallon <liam.fallon@est.tech>
Wed, 10 Jul 2019 19:44:39 +0000 (19:44 +0000)
commitadf67497761295115dc75b525500d687518fc4fd
treec5c5b5e737ac08256e9f782b5dccbd3ddc08d3c3
parent5c384fb2888029c2babb859c30318749e1ce828c
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 <liam.fallon@est.tech>
69 files changed:
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/event/EnEvent.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutor.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskExecutor.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutor.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/StateFinalizerExecutionContext.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskExecutionContext.java
core/core-engine/src/main/java/org/onap/policy/apex/core/engine/executor/context/TaskSelectionExecutionContext.java
core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/StateFinalizerExecutorTest.java
core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskExecutorTest.java
core/core-engine/src/test/java/org/onap/policy/apex/core/engine/executor/TaskSelectExecutorTest.java
examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/MfpUseCaseTest.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/ApexJmsConsumer.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConsumer.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/main/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumer.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java
plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutorTest.java
plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutorTest.java
plugins/plugins-executor/plugins-executor-java/src/test/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutorTest.java
plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutorTest.java
plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java
plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutorTest.java
plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java
plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java
plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java
plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutorTest.java
plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutorTest.java
plugins/plugins-executor/plugins-executor-mvel/src/test/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutorTest.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexEvent.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/enevent/ApexEvent2EnEventConverter.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorConsumer.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/consumer/ApexFileEventConsumer.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java
testsuites/integration/integration-uservice-test/pom.xml
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/DummyApexEventConsumer.java [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/DummyApexEventProducer.java [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/DummyCarrierTechnologyParameters.java [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/RunTestEvent.java [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/java/org/onap/policy/apex/testsuites/integration/uservice/executionproperties/TestExecutionProperties.java [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/AddPropertyTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/DefinedToEmptyTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToDefinedTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToEmptyTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/ReadOnlyTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RemovePropertyTask.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RunTestStateTSL.js [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/policy/ExecutionPropertiesTestPolicyModel.apex [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/addProperty_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/addProperty_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/addProperty_out_expected.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/definedToEmpty_out_expected.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToDefined_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToDefined_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToDefined_out_expected.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToEmpty_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToEmpty_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/emptyToEmpty_out_expected.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/readOnly_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/readOnly_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/readOnly_out_expected.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/removeProperty_conf.json [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/removeProperty_in.properties [new file with mode: 0644]
testsuites/integration/integration-uservice-test/src/test/resources/testdata/executionproperties/removeProperty_out_expected.properties [new file with mode: 0644]