Copilot commented on code in PR #13615:
URL: https://github.com/apache/trafficserver/pull/13615#discussion_r3908703859
##########
tests/gold_tests/pluginTest/origin_server_auth/origin_server_auth.test.py:
##########
@@ -68,6 +72,35 @@ def setUpOriginServer(self):
# add request/response
self.server.addResponse("sessionlog.log", request_header,
response_header)
+ with open(self.long_gcp_replay, "w", encoding="utf-8") as replay:
+ replay.write(
+ f'''meta:
+ version: "1.0"
+
+sessions:
+- transactions:
+ - client-request:
+ method: "GET"
+ url: /long-gcp-token
+ version: "1.1"
+ headers:
+ fields:
+ - [ uuid, long-gcp-token ]
+ - [ Host, www.example.com ]
+ - [ Authorization, {{ value: "Bearer {self.long_gcp_token}", as: equal
}} ]
+
+ server-response:
+ status: 200
+ reason: OK
+ headers:
+ fields:
+ - [ Content-Length, 8 ]
Review Comment:
The generated Proxy Verifier replay YAML is invalid because the list items
under `headers: fields:` and `server-response: headers: fields:` are not
indented beneath `fields:`. Also, the expected Authorization header is
currently `"******"`, which does not validate that the long bearer token is
forwarded intact (and will not match `Bearer <token>`).
Indent the YAML list items and set the expected Authorization value to
`Bearer {self.long_gcp_token}` so the test actually exercises the long-token
behavior.
--
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]