You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by dr...@apache.org on 2018/04/17 22:09:21 UTC
[trafficserver] branch master updated: Fix test to support fix in
autest 1.5.0
This is an automated email from the ASF dual-hosted git repository.
dragon 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 130970f Fix test to support fix in autest 1.5.0
130970f is described below
commit 130970fea3d0d3aa1a4e2ffead039b71def84fbc
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
---
tests/bootstrap.py | 2 +-
tests/gold_tests/autest-site/init.cli.ext | 2 +-
tests/gold_tests/h2/gold/post_chunked.gold | 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 +++++-----
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/tests/bootstrap.py b/tests/bootstrap.py
index bd6d8ab..c900f15 100755
--- a/tests/bootstrap.py
+++ b/tests/bootstrap.py
@@ -26,7 +26,7 @@ import platform
import sys
pip_packages = [
- "autest==1.4.2",
+ "autest==1.5.0",
"hyper",
"requests",
"dnslib",
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/h2/gold/post_chunked.gold b/tests/gold_tests/h2/gold/post_chunked.gold
index 11f11f9..ad47100 100644
--- a/tests/gold_tests/h2/gold/post_chunked.gold
+++ b/tests/gold_tests/h2/gold/post_chunked.gold
@@ -1 +1 @@
-0123456789
+0123456789
\ No newline at end of file
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 e09892b..aa174cd 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
dragon@apache.org.