bneradt commented on code in PR #12876:
URL: https://github.com/apache/trafficserver/pull/12876#discussion_r2824551660


##########
tests/gold_tests/pluginTest/filter_body/filter_body.replay.yaml:
##########
@@ -26,10 +26,17 @@ autest:
 
   server:
     name: 'server'
+    process_config:
+      other_args: '--verbose diag'
+    log_validation:
+      traffic_out:
+        excludes:
+          - expression: "FILTER_BODY_BLOCK_CANARY"
+            description: "Verify blocked request body never reached the origin"

Review Comment:
   Remove this `traffic_out` node - it will be incredibly confusing because ATS 
devs will think that it refers to the ATS traffic.out file. Just remove it, and 
let the user jump right to `excludes:` or `contains:`.



##########
tests/gold_tests/autest-site/ats_replay.test.ext:
##########
@@ -178,6 +178,19 @@ def ATSReplayTest(obj, replay_file: str):
         rc = server_config['return_code']
         server.ReturnCode = Any(*rc) if isinstance(rc, list) else rc
 
+    # Configure server log validation if specified.
+    server_log_validation = server_config.get('log_validation', {})
+    if server_log_validation:
+        traffic_out = server_log_validation.get('traffic_out', {})
+        for contains_entry in traffic_out.get('contains', []):
+            expression = contains_entry['expression']
+            description = contains_entry.get('description', f'Verify server 
traffic_out contains: {expression}')
+            server.Streams.All += Testers.ContainsExpression(expression, 
description)
+        for excludes_entry in traffic_out.get('excludes', []):
+            expression = excludes_entry['expression']
+            description = excludes_entry.get('description', f'Verify server 
traffic_out excludes: {expression}')
+            server.Streams.All += Testers.ExcludesExpression(expression, 
description)
+

Review Comment:
   As mentioned below, don't add the `traffic_out` node, just remove that 
middle node. It will be confused with the ATS traffic.out file.
   
   Also: while we're add it, add support for client verification output too.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to