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


##########
tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml:
##########
@@ -0,0 +1,136 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTP/3'
+
+  server:
+    name: 'server-log-debug-client-ip-http3'
+
+  client:
+    name: 'client-log-debug-client-ip-http3'
+
+  ats:
+    name: 'ts-log-debug-client-ip-http3'
+    process_config:
+      enable_cache: false
+      enable_tls: true
+      enable_quic: true
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+      proxy.config.quic.no_activity_timeout_in: 0
+
+    remap_config:
+    - from: 'https://debug-client-ip-http3.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after 
hooks \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming request 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming 
O.S. Response \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the proxy request headers 
after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 
2 \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming origin response 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+[\s\S]*?uuid: 
log-debug-http3-1'

Review Comment:
   Bound the Proxy's Response 2 matcher so it stops before the next Incoming 
Request marker.



##########
tests/gold_tests/logging/replay/log-debug-client-ip-http3.replay.yaml:
##########
@@ -0,0 +1,136 @@
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+meta:
+  version: "1.0"
+
+autest:
+  description: 'Verify client-IP-filtered debug logging for HTTP/3'
+
+  server:
+    name: 'server-log-debug-client-ip-http3'
+
+  client:
+    name: 'client-log-debug-client-ip-http3'
+
+  ats:
+    name: 'ts-log-debug-client-ip-http3'
+    process_config:
+      enable_cache: false
+      enable_tls: true
+      enable_quic: true
+
+    records_config:
+      proxy.config.diags.debug.enabled: 2
+      proxy.config.diags.debug.tags: 'http'
+      proxy.config.diags.debug.client_ip: '127.0.0.1'
+      proxy.config.quic.no_activity_timeout_in: 0
+
+    remap_config:
+    - from: 'https://debug-client-ip-http3.test/'
+      to: 'http://127.0.0.1:{SERVER_HTTP_PORT}/'
+
+    log_validation:
+      traffic_out:
+        contains:
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after 
hooks \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming request 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming 
O.S. Response \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the proxy request headers 
after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 
2 \+)[\s\S])*?uuid: log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the incoming origin response 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+[\s\S]*?uuid: 
log-debug-http3-1'
+          description: 'HTTP/3 transaction 1 logs the proxy response headers.'
+          multiline: true
+        - expression: '\+ Incoming Request \+(?:(?!\+ Proxy''s Request after 
hooks \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the incoming request 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Request after hooks \+(?:(?!\+ Incoming 
O.S. Response \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the proxy request headers 
after hooks.'
+          multiline: true
+        - expression: '\+ Incoming O.S. Response \+(?:(?!\+ Proxy''s Response 
2 \+)[\s\S])*?uuid: log-debug-http3-2'
+          description: 'HTTP/3 transaction 2 logs the incoming origin response 
headers.'
+          multiline: true
+        - expression: '\+ Proxy''s Response 2 \+[\s\S]*?uuid: 
log-debug-http3-2'

Review Comment:
   Bound the Proxy's Response 2 matcher so it stops before the next Incoming 
Request marker.



-- 
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