Conversation
…ip buildkite] ## The Issue WordPress bats tests were brittle because they matched the exact REST API discovery URL in the `link` header (`/index.php?rest_route=/` vs `/wp-json/`). A WordPress behavior change (enabling pretty permalinks by default) broke the tests. ## How This PR Solves The Issue Replace exact `assert_output --partial` matches on the `link` header with `assert_line --regexp` that matches the essential parts (site hostname and `rel="https://api.w.org/"`) without pinning the REST API URL format. ## Manual Testing Instructions Run the WordPress bats tests: ``` bats docs/tests/wordpress.bats ``` ## Automated Testing Overview This modifies the existing bats test assertions to be more resilient. No new tests needed — the change makes existing tests less sensitive to upstream WordPress permalink behavior. ## Release/Deployment Notes No impact. Test-only change. Co-Authored-By: Claude Opus 4.6 <[email protected]>
stasadev
approved these changes
Feb 12, 2026
Member
stasadev
left a comment
There was a problem hiding this comment.
Looks good to me.
I don't know what happened here.
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.
The Issue
WordPress bats tests were brittle because they matched the exact REST API discovery URL in the
linkheader (/index.php?rest_route=/vs/wp-json/). A WordPress behavior change seems to have broken this test in the last couple of days, see https://github.com/ddev/ddev/actions/runs/21928290932/job/63336208374How This PR Solves The Issue
assert_output --partialmatches on thelinkheader withassert_line --regexpthat matches the essential parts (site hostname andrel="https://api.w.org/") without pinning the REST API URL format.curl -Iinstead of adding-v, which made the output hard to read. The-vwas apparently debugging from an earlier problem.Manual Testing Instructions
Run the WordPress bats tests:
Automated Testing Overview
This modifies the existing bats test assertions to be more resilient. No new tests needed — the change makes existing tests less sensitive to upstream WordPress permalink behavior.
Release/Deployment Notes
No impact. Test-only change.