|
31 | 31 | Test.ContinueOnFail = True |
32 | 32 |
|
33 | 33 | # Define default ATS |
34 | | -ts = Test.MakeATSProcess("ts", enable_tls=True) |
| 34 | +if Condition.HasATSFeature('TS_USE_QUIC') and Condition.HasCurlFeature('http3'): |
| 35 | + ts = Test.MakeATSProcess("ts", enable_tls=True, enable_quic=True) |
| 36 | +else: |
| 37 | + ts = Test.MakeATSProcess("ts", enable_tls=True) |
| 38 | + |
| 39 | + |
35 | 40 | server = Test.MakeOriginServer("server", options={'--load': os.path.join(Test.TestDirectory, 'via-observer.py')}) |
36 | 41 |
|
37 | 42 | testName = "VIA" |
|
64 | 69 |
|
65 | 70 | # Set up to check the output after the tests have run. |
66 | 71 | via_log_id = Test.Disk.File("via.log") |
67 | | -via_log_id.Content = "via.gold" |
| 72 | +if Condition.HasATSFeature('TS_USE_QUIC') and Condition.HasCurlFeature('http3'): |
| 73 | + via_log_id.Content = "via_h3.gold" |
| 74 | +else: |
| 75 | + via_log_id.Content = "via.gold" |
68 | 76 |
|
69 | 77 | # Basic HTTP 1.1 |
70 | 78 | tr = Test.AddTestRun() |
|
91 | 99 |
|
92 | 100 | # HTTP 2 |
93 | 101 | tr = Test.AddTestRun() |
94 | | -tr.Processes.Default.Command = 'curl --verbose --ipv4 --insecure --header "Host: www.example.com" https://localhost:{}'.format( |
| 102 | +tr.Processes.Default.Command = 'curl --verbose --ipv4 --http2 --insecure --header "Host: www.example.com" https://localhost:{}'.format( |
95 | 103 | ts.Variables.ssl_port) |
96 | 104 | tr.Processes.Default.ReturnCode = 0 |
97 | 105 |
|
98 | 106 | tr.StillRunningAfter = server |
99 | 107 | tr.StillRunningAfter = ts |
100 | 108 |
|
| 109 | +# HTTP 3 |
| 110 | +if Condition.HasATSFeature('TS_HAS_QUICHE') and Condition.HasCurlFeature('http3'): |
| 111 | + tr = Test.AddTestRun() |
| 112 | + tr.Processes.Default.Command = 'curl --verbose --ipv4 --http3 --insecure --header "Host: www.example.com" https://localhost:{}'.format( |
| 113 | + ts.Variables.ssl_port) |
| 114 | + tr.Processes.Default.ReturnCode = 0 |
| 115 | + tr.StillRunningAfter = server |
| 116 | + tr.StillRunningAfter = ts |
| 117 | + |
101 | 118 | # TLS |
102 | 119 | tr = Test.AddTestRun() |
103 | 120 | tr.Processes.Default.Command = 'curl --verbose --ipv4 --http1.1 --insecure --header "Host: www.example.com" https://localhost:{}'.format( |
|
0 commit comments