changeset 793:59759c2a2d79

HttpMessageModificationFilterTest - configuration with $setContent
author Devel 1
date Thu, 21 Dec 2017 09:45:23 +0100
parents b3a0d3083d5e
children 3143f2ca9ee7
files stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java	Wed Dec 20 16:40:08 2017 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java	Thu Dec 21 09:45:23 2017 +0100
@@ -113,7 +113,7 @@
         HttpMessageModificationFilter filter = new HttpMessageModificationFilter();
         filter.addOperation(new ContentOperation(rule, newValue));
         filter.filterOutbound(req, null, null);
-        
+
         String filteredContent = helper.contentToString(req);
         assertEquals(expectedContent, filteredContent);
     }
@@ -203,10 +203,13 @@
                 + "      applyIf:\n"
                 + "        \"req.uri\": /path/test\n"
                 + "      operations:\n"
-                + "        $removeHeader: Header1\n";
+                + "        $removeHeader: Header1\n"
+                + "        $setContent:\n"
+                + "          regexp:aaa(.+)bbb: aaaa\n";
 
         Errors errors = new Errors();
         List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(filterConfig, errors, null);
+        HttpFilterTestUtils.printErrors(errors);
 
         assertEquals(0, errors.getErrorCount());
         assertEquals(1, filters.size());