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

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 95a2ce7  Fix AuTest for HTTP/2 using httpbin
95a2ce7 is described below

commit 95a2ce7a36e5cd965d9e0e7b20adde31ee8da654
Author: Masaori Koshiba <[email protected]>
AuthorDate: Wed Sep 11 15:02:49 2019 +0900

    Fix AuTest for HTTP/2 using httpbin
    
    (cherry picked from commit 2e15c6541e973ad6e45e1daf92549f7b5c47eccb)
---
 tests/gold_tests/h2/httpbin.test.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/gold_tests/h2/httpbin.test.py 
b/tests/gold_tests/h2/httpbin.test.py
index df26980..d31247c 100644
--- a/tests/gold_tests/h2/httpbin.test.py
+++ b/tests/gold_tests/h2/httpbin.test.py
@@ -64,18 +64,15 @@ ts.Disk.records_config.update({
 
 })
 ts.Disk.logging_yaml.AddLines(
-    '''
+'''
 logging:
   formats:
-    # Extended Log Format.
     - name: access
-      format: |-
-[%<cqtn>] %<cqtx> %<cqpv> %<cqssv> %<cqssc> %<crc> %<pssc> %<pscl>
+      format: '[%<cqtn>] %<cqtx> %<cqpv> %<cqssv> %<cqssc> %<crc> %<pssc> 
%<pscl>'
 
   logs:
     - filename: access
       format: access
-  }
 '''.split("\n")
 )
 
@@ -87,7 +84,8 @@ Test.Disk.File(os.path.join(ts.Variables.LOGDIR, 
'access.log'), exists=True, con
 
 # Test Case 0: Basic request and resposne
 test_run = Test.AddTestRun()
-test_run.Processes.Default.Command = 'curl -vs -k --http2 
https://127.0.0.1:{0}/get'.format(ts.Variables.ssl_port)
+# TODO: when httpbin 0.8.0 or later is released, remove below json pretty 
print hack
+test_run.Processes.Default.Command = "curl -vs -k --http2 
https://127.0.0.1:{0}/get | python -c 'import sys,json; 
print(json.dumps(json.load(sys.stdin), indent=2))".format(ts.Variables.ssl_port)
 test_run.Processes.Default.ReturnCode = 0
 test_run.Processes.Default.StartBefore(httpbin, 
ready=When.PortOpen(httpbin.Variables.Port))
 test_run.Processes.Default.StartBefore(Test.Processes.ts)

Reply via email to