You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by rr...@apache.org on 2019/06/20 16:03:25 UTC

[trafficserver] branch master updated: cookie_remap plugin Au test case changes for compatability with PR 4964.

This is an automated email from the ASF dual-hosted git repository.

rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new de1ed04  cookie_remap plugin Au test case changes for compatability with PR 4964.
de1ed04 is described below

commit de1ed04a29f2bb58e4e07de14775b1013c4f1031
Author: Walter Karas <wk...@verizonmedia.com>
AuthorDate: Wed Jun 19 18:36:22 2019 -0500

    cookie_remap plugin Au test case changes for compatability with PR 4964.
---
 tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py | 3 +--
 tests/gold_tests/pluginTest/cookie_remap/connector.test.py       | 3 +--
 tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py    | 9 ++++-----
 tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py       | 9 ++++-----
 tests/gold_tests/pluginTest/cookie_remap/substitute.test.py      | 3 +--
 5 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
index 95a3ebd..e1df4fe 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py
@@ -23,7 +23,6 @@ Test.Summary = '''
 Test.SkipUnless(Condition.PluginExists('cookie_remap.so'))
 Test.ContinueOnFail = True
 Test.testName = "cookie_remap: plugin collapses consecutive slashes"
-Test.SkipIf(Condition.true("Test is temporarily turned off, to be fixed according to an incompatible plugin API change (PR #4964)"))
 
 # Define default ATS
 ts = Test.MakeATSProcess("ts")
@@ -55,7 +54,7 @@ ts.Disk.File(ts.Variables.CONFIGDIR +"/collapseconfig.txt", exists=False, id="co
 ts.Disk.config1.WriteOn(config1)
 
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/magic http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/collapseconfig.txt'
+    'map http://www.example.com/magic http://shouldnothit.com/magic @plugin=cookie_remap.so @pparam=config/collapseconfig.txt'
 )
 
 tr = Test.AddTestRun("collapse consecutive forward slashes")
diff --git a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
index 223bcc0..4d595a4 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/connector.test.py
@@ -23,7 +23,6 @@ Test.Summary = '''
 Test.SkipUnless(Condition.PluginExists('cookie_remap.so'))
 Test.ContinueOnFail = True
 Test.testName = "cookie_remap: test connector"
-Test.SkipIf(Condition.true("Test is temporarily turned off, to be fixed according to an incompatible plugin API change (PR #4964)"))
 
 # Define default ATS
 ts = Test.MakeATSProcess("ts")
@@ -64,7 +63,7 @@ ts.Disk.File(ts.Variables.CONFIGDIR +"/connectorconfig.txt", exists=False, id="c
 ts.Disk.config1.WriteOn(config1)
 
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/magic http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/connectorconfig.txt'
+    'map http://www.example.com/magic http://shouldnothit.com/magic @plugin=cookie_remap.so @pparam=config/connectorconfig.txt'
 )
 
 # Positive test case that remaps because all connected operations pass
diff --git a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
index bd29d11..1da71a6 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/matrixparams.test.py
@@ -23,7 +23,6 @@ Test.Summary = '''
 Test.SkipUnless(Condition.PluginExists('cookie_remap.so'))
 Test.ContinueOnFail = True
 Test.testName = "cookie_remap: Tests when matrix parameters are present"
-Test.SkipIf(Condition.true("Test is temporarily turned off, to be fixed according to an incompatible plugin API change (PR #4964)"))
 
 # Define default ATS
 ts = Test.MakeATSProcess("ts")
@@ -74,16 +73,16 @@ ts.Disk.File(ts.Variables.CONFIGDIR +"/matrixconfig.txt", exists=False, id="conf
 ts.Disk.config1.WriteOn(config1)
 
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/eighth http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
+    'map http://www.example.com/eighth http://shouldnothit.com/eighth @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
 )
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/ninth http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
+    'map http://www.example.com/ninth http://shouldnothit.com/ninth @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
 )
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/tenth http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
+    'map http://www.example.com/tenth http://shouldnothit.com/tenth @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
 )
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/eleventh http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
+    'map http://www.example.com/eleventh http://shouldnothit.com/eleventh @plugin=cookie_remap.so @pparam=config/matrixconfig.txt'
 )
 
 tr = Test.AddTestRun("path is substituted")
diff --git a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
index ca00e08..9a636d7 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py
@@ -23,7 +23,6 @@ Test.Summary = '''
 Test.SkipUnless(Condition.PluginExists('cookie_remap.so'))
 Test.ContinueOnFail = True
 Test.testName = "cookie_remap: test connector"
-Test.SkipIf(Condition.true("Test is temporarily turned off, to be fixed according to an incompatible plugin API change (PR #4964)"))
 
 # Define default ATS
 ts = Test.MakeATSProcess("ts")
@@ -64,18 +63,18 @@ ts.Disk.File(ts.Variables.CONFIGDIR +"/subcookie.txt", exists=False, id="config1
 ts.Disk.config1.WriteOn(config1)
 
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/magic http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/subcookie.txt'
+    'map http://www.example.com http://shouldnothit.com/magic @plugin=cookie_remap.so @pparam=config/subcookie.txt'
 )
 
 # Positive test case that remaps because all connected operations pass
 tr = Test.AddTestRun("cookie value matches")
 # Unlike in other places I am using a single line string because the & seems to
 # be interpreted by the autest framework or the shell (tried escaping with \)
-tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com/magic" -H"Cookie: fpbeta=a=1&b=2&c=3" -H "Proxy-Connection: keep-alive" --verbose '.format(ts.Variables.port)
+tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com" -H"Cookie: fpbeta=a=1&b=2&c=3" -H "Proxy-Connection: keep-alive" --verbose '.format(ts.Variables.port)
 #tr.Processes.Default.Command = '''
 #curl
 #--proxy 127.0.0.1:{0}
-#"http://www.example.com/magic"
+#"http://www.example.com"
 #-H\"Cookie: fpbeta=a=1&b=2&c=3\"
 #-H "Proxy-Connection: keep-alive"
 #--verbose
@@ -90,7 +89,7 @@ server.Streams.All = "gold/matchcookie.gold"
 
 # Negative test case that doesn't remap because not all subops pass
 tr = Test.AddTestRun("cookie value doesn't match")
-tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com/magic" -H"Cookie: fpbeta=a=1&b=2&c=4" -H "Proxy-Connection: keep-alive" --verbose '.format(ts.Variables.port)
+tr.Processes.Default.Command = 'curl --proxy 127.0.0.1:{0} "http://www.example.com" -H"Cookie: fpbeta=a=1&b=2&c=4" -H "Proxy-Connection: keep-alive" --verbose '.format(ts.Variables.port)
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.StartBefore(server2, ready=When.PortOpen(server2.Variables.Port))
 tr.StillRunningAfter = ts
diff --git a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
index 1d0da8b..5bb358b 100644
--- a/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
+++ b/tests/gold_tests/pluginTest/cookie_remap/substitute.test.py
@@ -23,7 +23,6 @@ Test.Summary = '''
 Test.SkipUnless(Condition.PluginExists('cookie_remap.so'))
 Test.ContinueOnFail = True
 Test.testName = "cookie_remap: Substitute variables"
-Test.SkipIf(Condition.true("Test is temporarily turned off, to be fixed according to an incompatible plugin API change (PR #4964)"))
 
 # Define default ATS
 ts = Test.MakeATSProcess("ts")
@@ -61,7 +60,7 @@ ts.Disk.File(ts.Variables.CONFIGDIR +"/substituteconfig.txt", exists=False, id="
 ts.Disk.config1.WriteOn(config1)
 
 ts.Disk.remap_config.AddLine(
-    'map http://www.example.com/magic http://shouldnothit.com @plugin=cookie_remap.so @pparam=config/substituteconfig.txt'
+    'map http://www.example.com/magic http://shouldnothit.com/magic @plugin=cookie_remap.so @pparam=config/substituteconfig.txt'
 )
 
 tr = Test.AddTestRun("Substitute $path in the dest query")