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 2018/04/23 18:20:45 UTC
[trafficserver] branch 7.1.x updated: Fix test to support fix in
autest 1.5.0
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 75c5bb9 Fix test to support fix in autest 1.5.0
75c5bb9 is described below
commit 75c5bb91febc94fdc29ca861a5eaf5f5af57c11c
Author: Jason Kenny <dr...@live.com>
AuthorDate: Tue Apr 17 15:49:47 2018 -0500
Fix test to support fix in autest 1.5.0
update base requirements
remove extra newline
(cherry picked from commit 130970fea3d0d3aa1a4e2ffead039b71def84fbc)
Conflicts:
tests/bootstrap.py
tests/gold_tests/h2/gold/post_chunked.gold
---
tests/bootstrap.py | 7 +++++--
tests/gold_tests/autest-site/init.cli.ext | 2 +-
tests/gold_tests/headers/cache_and_req_body-hit.gold | 2 +-
tests/gold_tests/headers/cache_and_req_body-hit_close.gold | 2 +-
tests/gold_tests/headers/cache_and_req_body-miss.gold | 2 +-
tests/gold_tests/headers/cache_and_req_body.test.py | 10 +++++-----
6 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/tests/bootstrap.py b/tests/bootstrap.py
index 44a6d14..cc26348 100755
--- a/tests/bootstrap.py
+++ b/tests/bootstrap.py
@@ -26,8 +26,11 @@ import platform
import sys
pip_packages = [
- "autest",
- "hyper"
+ "autest==1.5.0",
+ "hyper",
+ "requests",
+ "dnslib",
+ "httpbin",
]
diff --git a/tests/gold_tests/autest-site/init.cli.ext b/tests/gold_tests/autest-site/init.cli.ext
index 903f12f..5aacbfb 100644
--- a/tests/gold_tests/autest-site/init.cli.ext
+++ b/tests/gold_tests/autest-site/init.cli.ext
@@ -23,7 +23,7 @@ if sys.version_info < (3, 5, 0):
host.WriteError(
"You need python 3.5 or later to run these tests\n", show_stack=False)
-autest_version ="1.4.2"
+autest_version ="1.5.0"
if AuTestVersion() < autest_version:
host.WriteError(
"Tests need AuTest version {ver} or better\n Please update AuTest:\n pip install --upgrade autest\n".format(ver=autest_version), show_stack=False)
diff --git a/tests/gold_tests/headers/cache_and_req_body-hit.gold b/tests/gold_tests/headers/cache_and_req_body-hit.gold
index 46791e7..90d4a97 100644
--- a/tests/gold_tests/headers/cache_and_req_body-hit.gold
+++ b/tests/gold_tests/headers/cache_and_req_body-hit.gold
@@ -8,4 +8,4 @@ Via: ``
Server: ``
X-Cache: hit-fresh
-xxx
+xxx
\ No newline at end of file
diff --git a/tests/gold_tests/headers/cache_and_req_body-hit_close.gold b/tests/gold_tests/headers/cache_and_req_body-hit_close.gold
index 5695558..ed944d2 100644
--- a/tests/gold_tests/headers/cache_and_req_body-hit_close.gold
+++ b/tests/gold_tests/headers/cache_and_req_body-hit_close.gold
@@ -8,4 +8,4 @@ Via: ``
Server: ``
X-Cache: hit-fresh
-xxx
+xxx
\ No newline at end of file
diff --git a/tests/gold_tests/headers/cache_and_req_body-miss.gold b/tests/gold_tests/headers/cache_and_req_body-miss.gold
index 41b57d9..cbbe86e 100644
--- a/tests/gold_tests/headers/cache_and_req_body-miss.gold
+++ b/tests/gold_tests/headers/cache_and_req_body-miss.gold
@@ -8,4 +8,4 @@ Via: ``
Server: ``
X-Cache: miss
-xxx
+xxx
\ No newline at end of file
diff --git a/tests/gold_tests/headers/cache_and_req_body.test.py b/tests/gold_tests/headers/cache_and_req_body.test.py
index 22a307d..a952cc2 100644
--- a/tests/gold_tests/headers/cache_and_req_body.test.py
+++ b/tests/gold_tests/headers/cache_and_req_body.test.py
@@ -30,7 +30,7 @@ Test.SkipUnless(
Test.ContinueOnFail = True
# Define default ATS
-ts = Test.MakeATSProcess("ts", select_ports=False)
+ts = Test.MakeATSProcess("ts")
server = Test.MakeOriginServer("server")
#**testname is required**
@@ -57,28 +57,28 @@ ts.Disk.remap_config.AddLine(
tr = Test.AddTestRun()
tr.Processes.Default.StartBefore(server)
tr.Processes.Default.StartBefore(Test.Processes.ts, ready=1)
-tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H "x-debug: x-cache,x-cache-key,via" -H "Host: www.example.com" http://localhost:8080/'
+tr.Processes.Default.Command = 'curl -s -D - -v --ipv4 --http1.1 -H "x-debug: x-cache,x-cache-key,via" -H "Host: www.example.com" http://localhost:{port}/'.format(port=ts.Variables.port)
tr.Processes.Default.ReturnCode = 0
tr.Processes.Default.Streams.stdout = "cache_and_req_body-miss.gold"
tr.StillRunningAfter = ts
# Test 2 - 200 cached response and using netcat
tr = Test.AddTestRun()
-tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: www.example.com\r\n''\r\n'|nc 127.0.0.1 8080"
+tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: www.example.com\r\n''\r\n'|nc 127.0.0.1 -w 1 {port}".format(port=ts.Variables.port)
tr.Processes.Default.ReturnCode = 0
tr.Processes.Default.Streams.stdout = "cache_and_req_body-hit.gold"
tr.StillRunningAfter = ts
# Test 3 - 200 cached response and trying to hide a request in the body
tr = Test.AddTestRun()
-tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: www.example.com\r\n''Content-Length: 71\r\n''\r\n''GET /index.html?evil=zorg810 HTTP/1.1\r\n''Host: dummy-host.example.com\r\n''\r\n'|nc 127.0.0.1 8080"
+tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: www.example.com\r\n''Content-Length: 71\r\n''\r\n''GET /index.html?evil=zorg810 HTTP/1.1\r\n''Host: dummy-host.example.com\r\n''\r\n'|nc 127.0.0.1 -w 1 {port}".format(port=ts.Variables.port)
tr.Processes.Default.ReturnCode = 0
tr.Processes.Default.Streams.stdout = "cache_and_req_body-hit.gold"
tr.StillRunningAfter = ts
# Test 4 - 200 cached response and Content-Length larger than bytes sent, MUST close
tr = Test.AddTestRun()
-tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: dummy-host.example.com\r\n''Cache-control: max-age=300\r\n''Content-Length: 100\r\n''\r\n''GET /index.html?evil=zorg810 HTTP/1.1\r\n''Host: dummy-host.example.com\r\n''\r\n'|nc 127.0.0.1 8080"
+tr.Processes.Default.Command = "printf 'GET / HTTP/1.1\r\n''x-debug: x-cache,x-cache-key,via\r\n''Host: dummy-host.example.com\r\n''Cache-control: max-age=300\r\n''Content-Length: 100\r\n''\r\n''GET /index.html?evil=zorg810 HTTP/1.1\r\n''Host: dummy-host.example.com\r\n''\r\n'|nc 127.0.0.1 -w 1 {port}".format(port=ts.Variables.port)
tr.Processes.Default.ReturnCode = 0
tr.Processes.Default.Streams.stdout = "cache_and_req_body-hit_close.gold"
tr.StillRunningAfter = ts
--
To stop receiving notification emails like this one, please contact
zwoop@apache.org.