From fe85d7be667779720d3261edb52d7c61724e4e94 Mon Sep 17 00:00:00 2001 From: Brian Neradt Date: Tue, 7 Feb 2023 16:54:15 +0000 Subject: [PATCH] Update h2disable tests for new curl output The h2disable and h2disable_no_accept_threads autests both had curl output expectations that have changed in the recent release of curl. Here is the old output: ``` Using HTTP2, server supports multiplexing ``` Here is the new output ``` using HTTP/2 ``` This updates the ContainsExpression and ExcludesExpression strings to be able to work with both versions of curl. --- tests/gold_tests/h2/h2disable.test.py | 6 +++--- tests/gold_tests/h2/h2disable_no_accept_threads.test.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/gold_tests/h2/h2disable.test.py b/tests/gold_tests/h2/h2disable.test.py index 004eedffe3d..e7cb6649be1 100644 --- a/tests/gold_tests/h2/h2disable.test.py +++ b/tests/gold_tests/h2/h2disable.test.py @@ -70,7 +70,7 @@ tr.StillRunningAfter = ts tr.Processes.Default.TimeOut = 5 tr.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr.Processes.Default.Streams.All += Testers.ContainsExpression("Using HTTP2", "Curl should negotiate HTTP2") +tr.Processes.Default.Streams.All += Testers.ContainsExpression("[Uu]sing HTTP/?2", "Curl should negotiate HTTP2") tr.TimeOut = 5 tr2 = Test.AddTestRun("Do not negotiate h2") @@ -80,7 +80,7 @@ tr2.Processes.Default.TimeOut = 5 tr2.StillRunningAfter = ts tr2.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("Using HTTP2", "Curl should not negotiate HTTP2") +tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("[Uu]sing HTTP/?2", "Curl should not negotiate HTTP2") tr2.TimeOut = 5 tr2 = Test.AddTestRun("Do not negotiate h2") @@ -91,5 +91,5 @@ tr2.Processes.Default.TimeOut = 5 tr2.StillRunningAfter = ts tr2.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("Using HTTP2", "Curl should not negotiate HTTP2") +tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("[Uu]sing HTTP/?2", "Curl should not negotiate HTTP2") tr2.TimeOut = 5 diff --git a/tests/gold_tests/h2/h2disable_no_accept_threads.test.py b/tests/gold_tests/h2/h2disable_no_accept_threads.test.py index 8feb8b3fc51..a332bdcd9c2 100644 --- a/tests/gold_tests/h2/h2disable_no_accept_threads.test.py +++ b/tests/gold_tests/h2/h2disable_no_accept_threads.test.py @@ -70,7 +70,7 @@ tr.StillRunningAfter = ts tr.Processes.Default.TimeOut = 5 tr.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr.Processes.Default.Streams.All += Testers.ContainsExpression("Using HTTP2", "Curl should negotiate HTTP2") +tr.Processes.Default.Streams.All += Testers.ContainsExpression("[Uu]sing HTTP/?2", "Curl should negotiate HTTP2") tr.TimeOut = 5 tr2 = Test.AddTestRun("Do not negotiate h2") @@ -80,7 +80,7 @@ tr2.Processes.Default.TimeOut = 5 tr2.StillRunningAfter = ts tr2.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("Using HTTP2", "Curl should not negotiate HTTP2") +tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("[Uu]sing HTTP/?2", "Curl should not negotiate HTTP2") tr2.TimeOut = 5 tr2 = Test.AddTestRun("Do not negotiate h2") @@ -91,5 +91,5 @@ tr2.Processes.Default.TimeOut = 5 tr2.StillRunningAfter = ts tr2.Processes.Default.Streams.All = Testers.ExcludesExpression("Could Not Connect", "Curl attempt should have succeeded") -tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("Using HTTP2", "Curl should not negotiate HTTP2") +tr2.Processes.Default.Streams.All += Testers.ExcludesExpression("[Uu]sing HTTP/?2", "Curl should not negotiate HTTP2") tr2.TimeOut = 5