You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by wk...@apache.org on 2023/03/01 02:24:03 UTC

[trafficserver] 03/04: TEMP

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

wkaras pushed a commit to branch tunnel_stats
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 85db8448d1995d5c3f27b4bf6a1777c94a50e252
Author: Walt Karas <wk...@yahooinc.com>
AuthorDate: Tue Feb 28 02:25:53 2023 +0000

    TEMP
---
 tests/gold_tests/tls/tls_partial_blind_tunnel.test.py | 12 ++++++++++++
 tests/gold_tests/tls/tls_tunnel.test.py               | 12 ++++++++++++
 tests/gold_tests/tls/tls_tunnel_forward.test.py       | 12 ++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/tests/gold_tests/tls/tls_partial_blind_tunnel.test.py b/tests/gold_tests/tls/tls_partial_blind_tunnel.test.py
index 021eae888..1af665114 100644
--- a/tests/gold_tests/tls/tls_partial_blind_tunnel.test.py
+++ b/tests/gold_tests/tls/tls_partial_blind_tunnel.test.py
@@ -74,3 +74,15 @@ tr.Processes.Default.Streams.All += Testers.ExcludesExpression("Not Found on Acc
                                                                "Should not try to remap on Traffic Server")
 tr.Processes.Default.Streams.All += Testers.ContainsExpression("HTTP/1.1 200 OK", "Should get a successful response")
 tr.Processes.Default.Streams.All += Testers.ContainsExpression("ok bar", "Body is expected")
+
+tr = Test.AddTestRun("Test Metrics")
+tr.Processes.Default.Command = (
+    # f"{Test.Variables.AtsTestToolsDir}/stdout_wait" +
+    #" 'traffic_ctl metric get"
+    #f" {Test.TestDirectory}/gold/remap-ws-metrics.gold"
+    "sleep 10 ; traffic_ctl metric match conn"
+)
+# Need to copy over the environment so traffic_ctl knows where to find the unix domain socket
+tr.Processes.Default.Env = ts.Env
+tr.Processes.Default.ReturnCode = 0
+tr.StillRunningAfter = ts
diff --git a/tests/gold_tests/tls/tls_tunnel.test.py b/tests/gold_tests/tls/tls_tunnel.test.py
index 3794bee1e..0f99c29c9 100644
--- a/tests/gold_tests/tls/tls_tunnel.test.py
+++ b/tests/gold_tests/tls/tls_tunnel.test.py
@@ -209,3 +209,15 @@ tr.Processes.Default.Streams.All += Testers.ExcludesExpression("Could Not Connec
 tr.Processes.Default.Streams.All += Testers.ExcludesExpression("Not Found on Accelerato", "Terminates on on Traffic Server")
 tr.Processes.Default.Streams.All += Testers.ExcludesExpression("ATS", "Terminate on Traffic Server")
 tr.Processes.Default.Streams.All += Testers.ContainsExpression("bar ok", "Should get a response from bar")
+
+tr = Test.AddTestRun("Test Metrics")
+tr.Processes.Default.Command = (
+    # f"{Test.Variables.AtsTestToolsDir}/stdout_wait" +
+    #" 'traffic_ctl metric get"
+    #f" {Test.TestDirectory}/gold/remap-ws-metrics.gold"
+    "sleep 10 ; traffic_ctl metric match conn"
+)
+# Need to copy over the environment so traffic_ctl knows where to find the unix domain socket
+tr.Processes.Default.Env = ts.Env
+tr.Processes.Default.ReturnCode = 0
+tr.StillRunningAfter = ts
diff --git a/tests/gold_tests/tls/tls_tunnel_forward.test.py b/tests/gold_tests/tls/tls_tunnel_forward.test.py
index d82b92a07..c48481f8e 100644
--- a/tests/gold_tests/tls/tls_tunnel_forward.test.py
+++ b/tests/gold_tests/tls/tls_tunnel_forward.test.py
@@ -122,3 +122,15 @@ tr3.Processes.Default.Streams.All += Testers.ExcludesExpression(
 tr3.Processes.Default.Streams.All += Testers.ContainsExpression("CN=foo.com", "Should TLS terminate on Traffic Server")
 tr3.Processes.Default.Streams.All += Testers.ContainsExpression("HTTP/1.1 200 OK", "Should get a successful response")
 tr3.Processes.Default.Streams.All += Testers.ContainsExpression("ok random", "Body is expected")
+
+tr = Test.AddTestRun("Test Metrics")
+tr.Processes.Default.Command = (
+    # f"{Test.Variables.AtsTestToolsDir}/stdout_wait" +
+    #" 'traffic_ctl metric get"
+    #f" {Test.TestDirectory}/gold/remap-ws-metrics.gold"
+    "sleep 10 ; traffic_ctl metric match conn"
+)
+# Need to copy over the environment so traffic_ctl knows where to find the unix domain socket
+tr.Processes.Default.Env = ts.Env
+tr.Processes.Default.ReturnCode = 0
+tr.StillRunningAfter = ts