changeset 796:caa4151f8679

HttpScopeModificationFilter operations name changed
author Devel 2
date Thu, 21 Dec 2017 12:09:11 +0100
parents 315469a3b03c
children b7cd4dc24c18
files stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilter.java stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTransformer.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTest.java
diffstat 3 files changed, 21 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilter.java	Thu Dec 21 12:06:17 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilter.java	Thu Dec 21 12:09:11 2017 +0100
@@ -258,13 +258,13 @@
 
             KeyNameVaryListNodeDefinition operationsDef = new KeyNameVaryListNodeDefinition()
                     .setNodeTransformer(new HttpScopeModificationFilterTransformer())
-                    .add("$removeSession", nullValueDef())
-                    .add("$removeSessionParam", valueDef())
-                    .add("$addSessionParam", setSessionDef)
-                    .add("$setSessionParam", setSessionDef)
-                    .add("$removeGlobalParam", valueDef())
-                    .add("$addGlobalParam", setGlobalDef)
-                    .add("$setGlobalParam", setGlobalDef);
+                    .add("removeSession", nullValueDef())
+                    .add("removeSessionParam", valueDef())
+                    .add("addSessionParam", setSessionDef)
+                    .add("setSessionParam", setSessionDef)
+                    .add("removeGlobalParam", valueDef())
+                    .add("addGlobalParam", setGlobalDef)
+                    .add("setGlobalParam", setGlobalDef);
 
             return mapDef(
                     tupleDef("operations", operationsDef),
--- a/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTransformer.java	Thu Dec 21 12:06:17 2017 +0100
+++ b/stress-tester/src/main/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTransformer.java	Thu Dec 21 12:09:11 2017 +0100
@@ -114,33 +114,33 @@
                 errors.pushNestedPath(opName);
                 Operation op = null;
                 switch (opName.toLowerCase()) {
-                    case "$removesession":
+                    case "removesession":
                         op = new RemoveSessionOperation();
                         break;
-                    case "$removesessionparam": {
+                    case "removesessionparam": {
                         String paramName = ConfigurationUtils.extractString(tuple, errors);
                         if (paramName != null) {
                             op = new RemoveSessionParamOperation(paramName);
                         }
                         break;
                     }
-                    case "$addsessionparam":
+                    case "addsessionparam":
                         op = createSetSessionParamOperation(tuple, errors, true);
                         break;
-                    case "$setsessionparam":
+                    case "setsessionparam":
                         op = createSetSessionParamOperation(tuple, errors, false);
                         break;
-                    case "$removeglobalparam": {
+                    case "removeglobalparam": {
                         String paramName = ConfigurationUtils.extractString(tuple, errors);
                         if (paramName != null) {
                             op = new RemoveGlobalParamOperation(paramName);
                         }
                         break;
                     }
-                    case "$addglobalparam":
+                    case "addglobalparam":
                         op = createSetGlobalParamOperation(tuple, errors, true);
                         break;
-                    case "$setglobalparam":
+                    case "setglobalparam":
                         op = createSetGlobalParamOperation(tuple, errors, false);
                         break;
 
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTest.java	Thu Dec 21 12:06:17 2017 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpScopeModificationFilterTest.java	Thu Dec 21 12:09:11 2017 +0100
@@ -165,17 +165,17 @@
         String filterConfig = "filters:\n"
                 + "    - type: modifyScope\n"
                 + "      operations:\n"
-                + "        $removeSession: ~\n"
-                + "        $removeSessionParam: ParaName\n"
-                + "        $addSessionParam: \n"
+                + "        removeSession: ~\n"
+                + "        removeSessionParam: ParaName\n"
+                + "        addSessionParam: \n"
                 + "           NewParam1: NewParamValue1\n"
-                + "        $setSessionParam: \n"
+                + "        setSessionParam: \n"
                 + "           \"@autocreate\": true\n"
                 + "           NewParam2: NewParamValue2\n"
-                + "        $removeGlobalParam: GlobalParamName\n"
-                + "        $addGlobalParam: \n"
+                + "        removeGlobalParam: GlobalParamName\n"
+                + "        addGlobalParam: \n"
                 + "           NewGlobalParam1: NewGlobalParamValue1\n"
-                + "        $setGlobalParam: \n"
+                + "        setGlobalParam: \n"
                 + "           NewGlobalParam2: NewGlobalParamValue2\n";
 
         Errors errors = new Errors();