Skip to content

Commit dd42ef1

Browse files
committed
Add plain-permalinks (rest_route) golden URL table for every endpoint
Drive each of the 45 self-hosted endpoint URL builders through a rest_route-seeded WpOrgSiteApiUrlResolver and assert the exact ?rest_route= URL, the plain-permalinks counterpart to the per-endpoint wp-json golden assertions. Covers all three self-hosted namespaces plus embedded-slash paths (plugins, block-renderer) and the api root. This validates URL construction across the full endpoint surface on plain-permalink sites; it complements test_login_plain_permalinks_mut, which proves one endpoint end-to-end against a live server.
1 parent 339dc38 commit dd42ef1

3 files changed

Lines changed: 612 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3939
- **Internal:** Documented how to pick an xcframework build for local work, and added `make help` descriptions for the `xcframework-only-*` targets. Verifying a UniFFI change needs only `make xcframework-only-macos`, not the full 11-target `make xcframework`.
4040
- **Internal:** Fixed `make xcframework-only-<platform>` building the per-target libraries but never assembling them into the xcframework. The `@# Help:` comments added for those `make help` descriptions became each rule's recipe and silently shadowed the shared `xcframework-only-%` pattern rule that ran the assemble step; each rule now runs the assemble step directly.
4141
- **Internal:** Update translations.
42+
- **Internal:** Added a golden URL table (`plain_permalinks_url_tests`) asserting all 45 self-hosted endpoints resolve to the correct `?rest_route=` URL on a plain-permalinks site, by driving each endpoint's real URL builder through a `rest_route`-seeded `WpOrgSiteApiUrlResolver`. Complements the per-endpoint `wp-json` golden assertions and the `test_login_plain_permalinks_mut` end-to-end test.
4243

4344
### Fixed
4445

wp_api/src/request/endpoint.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ pub mod widgets_endpoint;
4949
pub mod wp_block_editor_endpoint;
5050
pub mod wp_site_health_tests_endpoint;
5151

52+
#[cfg(test)]
53+
mod plain_permalinks_url_tests;
54+
5255
pub const WP_JSON_PATH_SEGMENTS: [&str; 1] = ["wp-json"];
5356

5457
uniffi::custom_newtype!(WpEndpointUrl, String);

0 commit comments

Comments
 (0)