diff options
Diffstat (limited to 'testsuites/integration/integration-uservice-test/src/test/resources/policies')
11 files changed, 52 insertions, 39 deletions
diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/AddPropertyTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/AddPropertyTask.js index 54826ce7a..b3176b3ed 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/AddPropertyTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/AddPropertyTask.js @@ -18,14 +18,14 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties in:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties in:" + executor.getExecutionProperties()); var executionProperties = new java.util.Properties(); executor.getExecutionProperties().setProperty("goodbye", "mars"); -executor.logger.info("executionProperties out:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties out:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/DefinedToEmptyTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/DefinedToEmptyTask.js index 4596dd4b4..90d522575 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/DefinedToEmptyTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/DefinedToEmptyTask.js @@ -18,14 +18,14 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties in:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties in:" + executor.getExecutionProperties()); var executionProperties = new java.util.Properties(); executor.getExecutionProperties().clear(); -executor.logger.info("executionProperties out:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties out:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToDefinedTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToDefinedTask.js index ba807cf73..bdfd806bd 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToDefinedTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToDefinedTask.js @@ -18,14 +18,14 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties in:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties in:" + executor.getExecutionProperties()); var executionProperties = new java.util.Properties(); executor.getExecutionProperties().setProperty("hello", "world"); -executor.logger.info("executionProperties out:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties out:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToEmptyTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToEmptyTask.js index 6cae0ceb1..3ade84846 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToEmptyTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/EmptyToEmptyTask.js @@ -18,8 +18,9 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); +executor.logger.debug(executor.getInFields().toString()); +executor.logger.debug("executionProperties:" + executor.getExecutionProperties()); +executor.logger.debug(executor.getOutFields().toString()); -executor.logger.info("executionProperties:" + executor.getExecutionProperties()); - -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/ReadOnlyTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/ReadOnlyTask.js index 6cae0ceb1..a5806cd72 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/ReadOnlyTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/ReadOnlyTask.js @@ -18,8 +18,10 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); +executor.logger.debug(executor.getInFields().toString()); +executor.logger.debug("executionProperties:" + executor.getExecutionProperties()); -executor.logger.info("executionProperties:" + executor.getExecutionProperties()); +executor.logger.debug(executor.getOutFields().toString()); -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RemovePropertyTask.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RemovePropertyTask.js index 2d934636a..12ec9aee1 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RemovePropertyTask.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RemovePropertyTask.js @@ -18,14 +18,14 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties in:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties in:" + executor.getExecutionProperties()); var executionProperties = new java.util.Properties(); executor.getExecutionProperties().remove("hello"); -executor.logger.info("executionProperties out:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties out:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue; +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RunTestStateTSL.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RunTestStateTSL.js index f41c7c02a..86838fe7c 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RunTestStateTSL.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/RunTestStateTSL.js @@ -18,13 +18,18 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); +executor.logger.debug(executor.getInFields().toString()); +executor.logger.debug("executionProperties:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue; +executor.logger.debug("testToRun:" + executor.getInFields().get("testToRun")); -executor.logger.info("executionProperties:" + executor.getExecutionProperties()); +var returnValue = true; -switch (executor.inFields.get("testToRun")) { +// Convert Java string to a Javascript variable +var testToRun = String(executor.getInFields().get("testToRun")).valueOf(); + +switch (testToRun) { case "ReadOnly": executor.subject.getTaskKey("ReadOnlyTask").copyTo(executor.selectedTask); break; @@ -50,7 +55,11 @@ switch (executor.inFields.get("testToRun")) { break; default: - executor.subject.getTaskKey("ReadOnlyTask").copyTo(executor.selectedTask); + executor.logger.debug("invalid value for testToRun:" + executor.getInFields().get("testToRun")); + returnValue = false; } -executor.logger.info("Selected Task:" + executor.selectedTask); +executor.logger.debug("Selected Task:" + executor.selectedTask); + +returnValue; + diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskFetchHttpCode.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskFetchHttpCode.js index 3bf129bf8..b60e2acee 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskFetchHttpCode.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskFetchHttpCode.js @@ -18,15 +18,15 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties: " + executor.getExecutionProperties()); +executor.logger.debug("executionProperties: " + executor.getExecutionProperties()); if (executor.getExecutionProperties().get("HTTP_CODE_STATUS") == "500") executor.outFields.put("testToRun", "CodeFilterSet"); else executor.outFields.put("testToRun", "CodeFilterDefault"); -executor.logger.info("testToRun: " + executor.outFields.get("testToRun")); +executor.logger.debug("testToRun: " + executor.outFields.get("testToRun")); -var returnValue = executor.isTrue;
\ No newline at end of file +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskTagUrl.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskTagUrl.js index b584ec464..d72a002d4 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskTagUrl.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/executionproperties/logic/TaskTagUrl.js @@ -18,13 +18,13 @@ * ============LICENSE_END========================================================= */ -executor.logger.info(executor.getSubject().getId()); +executor.logger.debug(executor.getSubject().getId()); -executor.logger.info("executionProperties in:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties in:" + executor.getExecutionProperties()); executor.getExecutionProperties().setProperty("tagId", executor.inFields.get("testToRun")); executor.getExecutionProperties().setProperty("value", "3"); -executor.logger.info("executionProperties out:" + executor.getExecutionProperties()); +executor.logger.debug("executionProperties out:" + executor.getExecutionProperties()); -var returnValue = executor.isTrue;
\ No newline at end of file +true; diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetControlLoopNameForTest.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetControlLoopNameForTest.js index 9d02b0228..f52590b1e 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetControlLoopNameForTest.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetControlLoopNameForTest.js @@ -34,4 +34,4 @@ executor.getExecutionProperties().setProperty("value", closedLoopId); executor.logger.info("executionProperties out: {}", executor.getExecutionProperties().toString()); -var returnValue = executor.isTrue;
\ No newline at end of file +true;
\ No newline at end of file diff --git a/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetServiceIdForTest.js b/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetServiceIdForTest.js index 814e30217..c5555b99e 100644 --- a/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetServiceIdForTest.js +++ b/testsuites/integration/integration-uservice-test/src/test/resources/policies/taskparameters/SetServiceIdForTest.js @@ -33,4 +33,5 @@ if (null == svcId) { executor.getExecutionProperties().setProperty("value", svcId); executor.logger.info("executionProperties out: {}", executor.getExecutionProperties().toString()); -var returnValue = executor.isTrue;
\ No newline at end of file + +true;
\ No newline at end of file |