Files
RustProxy/tools/dev/fixtures/vcl_regression/README.md
T
2026-11-25 15:47:34 +01:00

1.6 KiB

Imported VCL regression fixtures

These are test inputs, including deliberately unsafe and rejected examples; they are not production configuration recipes.

The .vcl files can be imported through the authenticated /api/cache/rules/import-vcl endpoint. Adjacent .json files preserve 0.41.4 import snapshots; .candidate.json files record the corrected 0.42.0 importer. Only randomized vcl_flow.group identifiers are normalized to g1, g2, etc. for comparison. Active configurations must retain their actual identifiers.

The legacy_mutating_* examples cover branch selection when a selected branch changes or removes the header used by its condition. Their baseline snapshots retain the old flattened structure. header_stages and branches also cover later conditions that must observe current header values. Older flattened VCL conversions need re-import from their original source to acquire branch metadata.

rejected_protected must produce import warnings and must not be activated. rejected_unclosed must reject the source. Other examples cover terminal actions, Cookie and Vary handling, TTL, grace and backend-response controls.

The Rust suite has focused tests for the related importer, policy/VCL and credential-cache behavior. Run them from the source root:

cargo test --locked --lib cache::vcl_matrix_tests
cargo test --locked --lib proxy::vcl_policy_matrix_tests
cargo test --locked --lib proxy::cache_plan::credential_tests

These Rust tests define their cases in source; they do not automatically load this fixture directory. To validate an actual deployment, also import the relevant VCL and send requests through the running binary.