You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/06/30 21:07:24 UTC

[trafficserver] branch master updated: omits version string when verifying test output

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

zwoop 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 55e576b  omits version string when verifying test output
55e576b is described below

commit 55e576bbb779659ba3eff7c13dd17168942107ee
Author: Derek Dagit <de...@yahoo-inc.com>
AuthorDate: Fri Jun 30 17:47:38 2017 +0000

    omits version string when verifying test output
---
 tests/gold_tests/body_factory/gold/http-get-304.gold   | 2 +-
 tests/gold_tests/body_factory/http304_response.test.py | 5 +++--
 tests/gold_tests/body_factory/http_with_origin.test.py | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/gold_tests/body_factory/gold/http-get-304.gold b/tests/gold_tests/body_factory/gold/http-get-304.gold
index b737519..03f3ced 100644
--- a/tests/gold_tests/body_factory/gold/http-get-304.gold
+++ b/tests/gold_tests/body_factory/gold/http-get-304.gold
@@ -1,5 +1,5 @@
 HTTP/1.1 304 Not Modified
 Age: 0
 Connection: keep-alive
-Warning: 199 ApacheTrafficServer/8.0.0 Proxy received unexpected 304 response; content may be stale
+Warning: 199 VERSION Proxy received unexpected 304 response; content may be stale
 
diff --git a/tests/gold_tests/body_factory/http304_response.test.py b/tests/gold_tests/body_factory/http304_response.test.py
index c9219a0..ed672a6 100644
--- a/tests/gold_tests/body_factory/http304_response.test.py
+++ b/tests/gold_tests/body_factory/http304_response.test.py
@@ -24,6 +24,7 @@ Tests 304 responses
 '''
 
 Test.SkipUnless(Condition.HasProgram("grep", "grep needs to be installed on system for this test to work"))
+Test.SkipUnless(Condition.HasProgram("sed", "grep needs to be installed on system for this test to work"))
 
 ts = Test.MakeATSProcess("ts")
 server = Test.MakeOriginServer("server")
@@ -49,8 +50,8 @@ tr = Test.AddTestRun("Test domain {0}".format(DEFAULT_304_HOST))
 tr.Processes.Default.StartBefore(Test.Processes.ts)
 tr.StillRunningAfter = ts
 
-tr.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\
-    format(ts.Variables.port, 'data/{0}_get.txt'.format(DEFAULT_304_HOST))
+cmd_tpl = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/' | sed 's;ApacheTrafficServer\/[^ ]*;VERSION;'"
+tr.Processes.Default.Command = cmd_tpl.format(ts.Variables.port, 'data/{0}_get.txt'.format(DEFAULT_304_HOST))
 tr.Processes.Default.TimeOut = 5  # seconds
 tr.Processes.Default.ReturnCode = 0
 tr.Processes.Default.Streams.stdout = "gold/http-304.gold"
diff --git a/tests/gold_tests/body_factory/http_with_origin.test.py b/tests/gold_tests/body_factory/http_with_origin.test.py
index 38fc558..3eb85a0 100644
--- a/tests/gold_tests/body_factory/http_with_origin.test.py
+++ b/tests/gold_tests/body_factory/http_with_origin.test.py
@@ -24,6 +24,7 @@ Tests that HEAD requests return proper responses
 '''
 
 Test.SkipUnless(Condition.HasProgram("grep", "grep needs to be installed on system for this test to work"))
+Test.SkipUnless(Condition.HasProgram("sed", "grep needs to be installed on system for this test to work"))
 
 ts = Test.MakeATSProcess("ts")
 
@@ -101,8 +102,8 @@ trget304.StillRunningBefore = server
 trget304.StillRunningAfter = ts
 trget304.StillRunningAfter = server
 
-trget304.Processes.Default.Command = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/'".\
-    format(ts.Variables.port, 'data/{0}_get_304.txt'.format(HOST))
+cmd_tpl = "python tcp_client.py 127.0.0.1 {0} {1} | grep -v '^Date: '| grep -v '^Server: ATS/' | sed 's;ApacheTrafficServer\/[^ ]*;VERSION;'"
+trget304.Processes.Default.Command = cmd_tpl.format(ts.Variables.port, 'data/{0}_get_304.txt'.format(HOST))
 trget304.Processes.Default.TimeOut = 5  # seconds
 trget304.Processes.Default.ReturnCode = 0
 trget304.Processes.Default.Streams.stdout = "gold/http-get-304.gold"

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].