You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by pa...@apache.org on 2017/05/21 00:04:23 UTC

[trafficserver] branch master updated: remap test for secure communication with origin server

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

paziz 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  0306c44   remap test for secure communication with origin server
0306c44 is described below

commit 0306c442aa37a52a33067bb6df7ee5bb51de5f8d
Author: Persia Aziz <pe...@yahoo-inc.com>
AuthorDate: Wed May 10 13:37:45 2017 -0500

    remap test for secure communication with origin server
---
 tests/gold_tests/remap/gold/remap-https-200_2.gold | 13 +++++++++++++
 tests/gold_tests/remap/remap_https.test.py         | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/tests/gold_tests/remap/gold/remap-https-200_2.gold b/tests/gold_tests/remap/gold/remap-https-200_2.gold
new file mode 100644
index 0000000..4bb24ea
--- /dev/null
+++ b/tests/gold_tests/remap/gold/remap-https-200_2.gold
@@ -0,0 +1,13 @@
+``
+> GET / HTTP/1.1
+> Host: www.anotherexample.com``
+> User-Agent: curl/``
+``
+< HTTP/1.1 200 OK
+< Date: ``
+< Age: ``
+< Transfer-Encoding: chunked
+< Connection: keep-alive
+< Server: ATS/``
+< 
+``
diff --git a/tests/gold_tests/remap/remap_https.test.py b/tests/gold_tests/remap/remap_https.test.py
index 7c74478..84e6587 100644
--- a/tests/gold_tests/remap/remap_https.test.py
+++ b/tests/gold_tests/remap/remap_https.test.py
@@ -28,6 +28,7 @@ Test.ContinueOnFail=True
 # Define default ATS
 ts=Test.MakeATSProcess("ts",select_ports=False)
 server=Test.MakeOriginServer("server")
+server2=Test.MakeOriginServer("server2",ssl=True)
 
 #**testname is required**
 testName = ""
@@ -35,6 +36,7 @@ request_header={"headers": "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n", "t
 #desired response form the origin server
 response_header={"headers": "HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n", "timestamp": "1469733493.993", "body": ""}
 server.addResponse("sessionlog.json", request_header, response_header)
+server2.addResponse("sessionlog.json", request_header, response_header)
 
 #add ssl materials like key, certificates for the server
 ts.addSSLfile("ssl/server.pem")
@@ -58,6 +60,9 @@ ts.Disk.remap_config.AddLine(
 ts.Disk.remap_config.AddLine(
     'map https://www.example.com:{1} http://127.0.0.1:{0}'.format(server.Variables.Port,ts.Variables.ssl_port)
 )
+ts.Disk.remap_config.AddLine(
+    'map https://www.anotherexample.com https://127.0.0.1:{0}'.format(server2.Variables.Port,ts.Variables.ssl_port)
+)
 
 
 ts.Disk.ssl_multicert_config.AddLine(
@@ -71,6 +76,7 @@ tr.Processes.Default.ReturnCode=0
 
 # time delay as proxy.config.http.wait_for_cache could be broken
 tr.Processes.Default.StartBefore(server)
+tr.Processes.Default.StartBefore(server2)
 # Delay on readyness of our ssl ports
 tr.Processes.Default.StartBefore(Test.Processes.ts, ready=When.PortOpen(ts.Variables.ssl_port))
 tr.Processes.Default.Streams.stderr="gold/remap-hitATS-404.gold"
@@ -109,4 +115,11 @@ tr.Processes.Default.Command='curl --http1.1 -k https://127.0.0.1:{0} -H "Host:
 tr.Processes.Default.ReturnCode=0
 tr.Processes.Default.Streams.stderr="gold/remap-hitATS-404.gold"
 
+# map www.anotherexample.com to https://<IP of microserver>.com
+tr=Test.AddTestRun()
+tr.Processes.Default.Command='curl --http1.1 -k https://127.0.0.1:{0} -H "Host: www.anotherexample.com" --verbose'.format(ts.Variables.ssl_port)
+tr.Processes.Default.ReturnCode=0
+tr.Processes.Default.Streams.stderr="gold/remap-https-200_2.gold"
+tr.StillRunningAfter=server2
+
     

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