Add wp-env for local WordFence test environment#1209
Draft
Conversation
Replace the remote WordFence login test (Spec 8) with a local wp-env instance. wp-env manages Docker containers with WordPress + plugins, making tests self-contained and not dependent on external servers. The multi-environment structure under wp-env/ supports adding more configurations (each with its own port starting from 4100). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
XCFramework BuildThis PR's XCFramework is available for testing. Add to your .package(url: "https://github.com/automattic/wordpress-rs", branch: "pr-build/1209")Built from 3010d0a |
The default queue agents lack OpenSSL dev libraries needed to compile the Rust test binary. The android queue agents have them. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The /wp-json/ pretty permalink path requires Apache mod_rewrite with AllowOverride, which doesn't work reliably across Docker environments. Use plain permalinks instead so WordPress serves the REST API via ?rest_route= which works everywhere. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The wp-env test requires a separate wp-env server on localhost:4100 which isn't available in the Docker-based integration test environment. Mark it with #[ignore] so it's skipped in regular `cargo test -p wp_api_integration_tests` runs, and use --include-ignored in the dedicated wp-env CI step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
wp-envinfrastructure for running local WordPress test environments with pluginswp-envinstance running the real WordFence pluginwp-env/, each with its own port (starting at 4100)Test plan
make wp-env-wordfence-startstarts WordPress with WordFence on port 4100cargo test -p wp_api_integration_tests --test test_login_wp_envpasses locally🤖 Generated with Claude Code