You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2023/01/18 20:30:38 UTC

[GitHub] [trafficserver] lzx404243 commented on a diff in pull request #9315: Added http connect Autest with proxy verifier

lzx404243 commented on code in PR #9315:
URL: https://github.com/apache/trafficserver/pull/9315#discussion_r1074045434


##########
tests/gold_tests/connect/connect.test.py:
##########
@@ -106,3 +107,61 @@ def run(self):
 
 
 ConnectTest().run()
+
+
+class ConnectViaPVTest:
+    # This test also executes the CONNECT request but using proxy verifier to
+    # generate traffic
+    connectReplayFile = "replays/connect.replay.yaml"
+
+    def __init__(self):
+        self.setupOriginServer()
+        self.setupTS()
+
+    def setupOriginServer(self):
+        self.server = Test.MakeVerifierServerProcess(
+            "connect-verifier-server",
+            self.connectReplayFile)
+        # Verify server output
+        self.server.Streams.stdout += Testers.ExcludesExpression(
+            "uuid: 1",
+            "Verify the CONNECT request doesn't reach the server.")
+        self.server.Streams.stdout += Testers.ContainsExpression(
+            "GET /get HTTP/1.1\nuuid: 2", reflags=re.MULTILINE,
+            description="Verify the server gets the second request.")
+
+    def setupTS(self):
+        self.ts = Test.MakeATSProcess("connect-ts")
+
+        self.ts.Disk.records_config.update({
+            'proxy.config.diags.debug.enabled': 1,
+            'proxy.config.diags.debug.tags': 'http',
+            'proxy.config.http.server_ports': f"{self.ts.Variables.port}",
+            'proxy.config.http.connect_ports': f"{self.server.Variables.http_port}",

Review Comment:
   Tried that but that didn't work out. I think they take string type to support specifying a range of ports.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org