Skip to content

Remove template test xfails and enforce regressions as hard assertions - #1648

Merged
retlehs merged 3 commits into
masterfrom
tests/remove-template-xfails-after-fixes
Mar 5, 2026
Merged

retlehs merged 3 commits into
masterfrom
tests/remove-template-xfails-after-fixes

Conversation

@retlehs

@retlehs retlehs commented Mar 4, 2026

Copy link
Copy Markdown
Member

Summary

Converts template regression tests from xfail(strict=True) to normal hard assertions.

These tests were intentionally marked xfail until the underlying fixes landed. This PR enforces them as standard pass/fail checks.

Warning

This draft PR is expected to fail CI until #1640, #1641, and #1642 are merged.
It intentionally removes xfail(strict=True) so currently-known regressions fail hard.
Do not merge until those three PRs are merged and this branch is rebased onto master.

Refs #1643.

Why now

Current master CI is green because these are expected failures, not because the regressions are fixed in tests yet.

From CI run 22684086685:

  • XFAIL tests/templates/test_nginx_conf.py::test_cache_use_stale_excludes_updating_by_default - #1551
  • XFAIL tests/templates/test_wordpress_site_conf.py::test_cache_directives_scope_to_200_and_skip_location_responses - #1594
  • XFAIL tests/templates/test_wordpress_site_conf.py::test_multisite_subdirectory_rewrite_uses_request_uri - #1548
  • 4 passed, 3 xfailed in 0.73s

Run link: https://github.com/roots/trellis/actions/runs/22684086685

Changes

  • Remove xfail(strict=True) from:
    • tests/templates/test_nginx_conf.py::test_cache_use_stale_excludes_updating_by_default
    • tests/templates/test_wordpress_site_conf.py::test_cache_directives_scope_to_200_and_skip_location_responses
    • tests/templates/test_wordpress_site_conf.py::test_multisite_subdirectory_rewrite_uses_request_uri

Validation

Local run on this branch (no fix commits cherry-picked):

  • pytest -q -ra tests/templates -> 3 failed, 4 passed
  • failing tests correspond to #1551, #1594, #1548

Cherry-pick verification (temporary branch):

  • Cherry-picked #1640 (b42279c) and reran pytest -q -ra tests/templates
  • result changed to 2 failed, 5 passed
  • confirms #1548 failure is resolved when the corresponding fix is present

Merge plan

@retlehs
retlehs marked this pull request as ready for review March 5, 2026 04:47
Align test with #1642 which replaced the boolean
nginx_cache_use_stale_updating with a full-value nginx_cache_use_stale
variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@retlehs retlehs self-assigned this Mar 5, 2026
@retlehs
retlehs merged commit 71bc1ab into master Mar 5, 2026
2 checks passed
@retlehs
retlehs deleted the tests/remove-template-xfails-after-fixes branch March 5, 2026 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant