tests/gold_tests/headers tests: use ATSReplayTest - #13033
Merged
Merged
Conversation
bneradt
force-pushed
the
headers-atsreplay
branch
from
March 28, 2026 03:59
2435315 to
b529275
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Converts several tests/gold_tests/headers autests from bespoke Python orchestration to the ATSReplayTest (Proxy Verifier replay YAML) format.
Changes:
- Replaced multiple header-related gold tests’ Python setup/traffic generation with
Test.ATSReplayTest(...). - Added new replay YAML files (and related config assets) to encode the same scenarios in replay format.
- Added header_rewrite rule files and a regex_remap map file to support replay-driven configuration.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/gold_tests/headers/rewrite_rules/header_rewrite_rules_308.conf | New header_rewrite rules file used by replay-based redirect coverage. |
| tests/gold_tests/headers/rewrite_rules/header_rewrite_rules_307.conf | New header_rewrite rules file used by replay-based redirect coverage. |
| tests/gold_tests/headers/rewrite_rules/header_rewrite_rules_302.conf | New header_rewrite rules file used by replay-based redirect coverage. |
| tests/gold_tests/headers/rewrite_rules/header_rewrite_rules_301.conf | New header_rewrite rules file used by replay-based redirect coverage. |
| tests/gold_tests/headers/rewrite_rules/header_rewrite_rules_0.conf | New header_rewrite rules file for the unsupported redirect status case. |
| tests/gold_tests/headers/replays/range.replay.yaml | New replay converting the Range request test to ATSReplayTest format. |
| tests/gold_tests/headers/replays/normalized_ae_varied_transactions.replay.yaml | Adds autest configuration to run this replay via ATSReplayTest. |
| tests/gold_tests/headers/replays/invalid_range_request.replay.yaml | Adds autest configuration and replay-side proxy-response validation for 416. |
| tests/gold_tests/headers/replays/hsts.replay.yaml | New replay converting the HSTS test to ATSReplayTest format. |
| tests/gold_tests/headers/replays/domain-blacklist-30x.replay.yaml | New replay converting redirect/blacklist behavior to ATSReplayTest format. |
| tests/gold_tests/headers/replays/cached_ims_range.replay.yaml | New replay converting cached IMS/INM/range and regex_remap 304 handling to ATSReplayTest format. |
| tests/gold_tests/headers/replays/cache-test.replay.yaml | Adds autest configuration to run this replay via ATSReplayTest. |
| tests/gold_tests/headers/replays/accept_webp.replay.yaml | New replay converting accept-webp alternate behavior to ATSReplayTest format. |
| tests/gold_tests/headers/range.test.py | Simplified to invoke Test.ATSReplayTest with the new range replay. |
| tests/gold_tests/headers/normalized_ae_match_vary_cache.test.py | Simplified to invoke Test.ATSReplayTest with the normalized AE replay. |
| tests/gold_tests/headers/maps.reg | New regex_remap rules file used by the cached IMS/range replay. |
| tests/gold_tests/headers/invalid_range_header.test.py | Simplified to invoke Test.ATSReplayTest with the invalid-range replay. |
| tests/gold_tests/headers/hsts.test.py | Simplified to invoke Test.ATSReplayTest with the HSTS replay. |
| tests/gold_tests/headers/domain-blacklist-30x.test.py | Simplified to invoke Test.ATSReplayTest with the redirects replay. |
| tests/gold_tests/headers/cachedIMSRange.test.py | Simplified to invoke Test.ATSReplayTest with the cached IMS/range replay. |
| tests/gold_tests/headers/cachedDuplicateHeaders.test.py | Simplified to invoke Test.ATSReplayTest with the cached duplicate headers replay. |
| tests/gold_tests/headers/accept_webp.test.py | Simplified to invoke Test.ATSReplayTest with the accept-webp replay. |
masaori335
reviewed
Mar 31, 2026
Move the replay-friendly headers gold tests to ATSReplayTest wrappers and describe their ATS, origin, and client setup in replay YAML. This keeps the cache, range, redirect, HSTS, and alternate handling coverage while making the tests easier to read and maintain, and removes the old gold files left orphaned by the conversion.
bneradt
force-pushed
the
headers-atsreplay
branch
from
April 2, 2026 16:00
a153b84 to
16bb850
Compare
cmcfarlen
added a commit
to cmcfarlen/trafficserver
that referenced
this pull request
May 22, 2026
apache#13033 (tests/gold_tests/headers tests: use ATSReplayTest) deleted these gold files when migrating cachedIMSRange.test.py to ATSReplayTest. This trial branch reverts the cachedIMSRange test back to the pre-apache#13033 form (via the 11-Dev merge revert), which still references the original gold files. Restored verbatim from the parent of 49cb7c8.
cmcfarlen
pushed a commit
that referenced
this pull request
Jun 9, 2026
Move the replay-friendly headers gold tests to ATSReplayTest wrappers and describe their ATS, origin, and client setup in replay YAML. This keeps the cache, range, redirect, HSTS, and alternate handling coverage while making the tests easier to read and maintain, and removes the old gold files left orphaned by the conversion. (cherry picked from commit 49cb7c8)
bneradt
added a commit
to bneradt/trafficserver
that referenced
this pull request
Jun 10, 2026
Move the replay-friendly headers gold tests to ATSReplayTest wrappers and describe their ATS, origin, and client setup in replay YAML. This keeps the cache, range, redirect, HSTS, and alternate handling coverage while making the tests easier to read and maintain, and removes the old gold files left orphaned by the conversion. (cherry picked from commit 49cb7c8)
cmcfarlen
pushed a commit
that referenced
this pull request
Jun 10, 2026
* curl 8.20 test update: curl PROXY destination changes (#13239) curl 8.20 intentionally mirrors --haproxy-clientip into both PROXY addresses to keep the header address family consistent. The TSVConnPPInfo AuTest still expected the older destination address, so jobs with newer curl failed even though ATS preserved the PROXY metadata it received. This relaxes the destination-address expectation to accept either curl behavior while continuing to verify the source address and PROXY metadata. This also wraps the long curl command strings while leaving the test's request flow unchanged. (cherry picked from commit ad0ce02) * fedora:44: Trim remap ACL reload waits (#13237) The remap ACL AuTests run hundreds of reload scenarios in a single case, and the Fedora 44 shard is sensitive to extra reload-wait overhead, causing the tests to hang. Their reload sentinel also counted only explicit reloads, even though the log contains the startup load marker too. This replaces the long-lived sleep Ready helper with a short command that exits once the expected reload marker count is present. This also waits for the startup marker plus the explicit reload count, so each scenario observes the reload it just requested. (cherry picked from commit c52eeda) * Align AuTests with latest proxy-verifier checks (#12986) The latest proxy-verifier now fails a run when a verifier server or client is given proxy-side checks for traffic that ATS never produces. Most tests only needed stale proxy-request or proxy-response nodes removed, but the shared replay cases below need server-specific files so each verifier only owns traffic it can actually observe. - disable_pristine_host_hdr_server_canary_false.replay.yaml keeps the canary server on uuid 1 when pristine_host_hdr stays enabled. - disable_pristine_host_hdr_server_canary_true.replay.yaml keeps the canary server on uuid 1 when the Host header is rewritten. - disable_pristine_host_hdr_server_stable.replay.yaml keeps the stable server on uuid 2, which the canary server never receives. - escalate_original_server_default.replay.yaml keeps only the requests that the default-mode origin server really handles. - escalate_failover_server_default.replay.yaml keeps only the GET requests that default-mode escalation sends to failover. - escalate_original_server_non_get.replay.yaml keeps the origin-side subset when --escalate-non-get-methods is enabled. - escalate_failover_server_non_get.replay.yaml keeps the failover subset, including the escalated HEAD request in that mode. - ja4_fingerprint_basic_server.replay.yaml limits the non-preserve test to its one real request instead of preserve-only checks. - traffic_dump_server.yaml keeps origin verification only for the sessions that really reach origin in the main traffic_dump test. - traffic_dump_ip_filter_server.yaml keeps only the /one request used by the traffic_dump IP filter test. These per-server replays preserve fallback server-response directives and client-side coverage while dropping only the proxy-side checks that latest proxy-verifier now correctly reports as unprocessed. (cherry picked from commit ecf505c) * Fix 10.1.x PV replay expectations Adjust two replay expectations after backporting the proxy-verifier 3.1 cleanup. The 10.1.x branch has fewer escalate transactions, and duplicate header checks now observe the combined header value. * [autest] thread_config: add startup polling and skip test on non-Linux (#12940) * thread_config: add startup polling for thread checks and skip on non-Linux check_threads.py now uses a short bounded poll/retry window so thread-count validation does not fail on startup races; the test is also skipped on non-Linux platforms because per-thread introspection used by this check is not reliably available there. * thread_config: stop retrying when Process.threads() access is denied (cherry picked from commit 6dfaadd) * Fix flaky autests for timeout, sigusr2, and thread_config (#13012) * Handle SIGPIPE in ssl-delay-server to prevent helper death when a client disconnects during TLS handshake delay. * Retry accept() on EINTR under heavy parallel load instead of treating the interruption as a fatal error. * Fix accept() error check to use < 0 instead of <= 0 since fd 0 is a valid descriptor when stdin is closed. * Add cmdline matching fallback in check_threads.py for ASAN where the process CWD differs from expected ts_path. (cherry picked from commit ff31470) * Fix 10.1.x JA4 AuTest setup Initialize the branch-local JA4 test helper's preserve flag after backporting replay changes from master. Without it the test fails during Python load before the actual replay runs. * Proxy Verifier: use concise stack protocol specification (#13003) Proxy Verifier v3.0.0 has a more concise `stack` configurable for `protocol` specification. This makes use of that over the more verbose full `protocol` sequence. * tests/gold_tests/headers tests: use ATSReplayTest (#13033) Move the replay-friendly headers gold tests to ATSReplayTest wrappers and describe their ATS, origin, and client setup in replay YAML. This keeps the cache, range, redirect, HSTS, and alternate handling coverage while making the tests easier to read and maintain, and removes the old gold files left orphaned by the conversion. (cherry picked from commit 49cb7c8) * Adapt headers replay tests for 10.1.x --------- Co-authored-by: bneradt <bneradt@yahooinc.com> Co-authored-by: Mo Chen <mochen@apache.org> Co-authored-by: Bryan Call <bcall@apache.org>
Contributor
|
Cherry-picked to 10.2.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This converts the headers autests to use the ATSReplayTest format.