Conversation
oguzkocer
commented
Apr 11, 2025
| } | ||
| "http://localhost/wp-json" | "https://localhost/wp-json" => { | ||
| Ok(response_helpers::json_response_from_path(Path::new( | ||
| "../native/swift/Tests/wordpress-api/Resources/Responses/localhost-json-root.json", |
Contributor
Author
There was a problem hiding this comment.
Kotlin, Swift & Rust tests are using this path. We should move it to a common place, but I wanted to separate that into its own PR.
jkmassel
requested changes
Apr 11, 2025
Contributor
jkmassel
left a comment
There was a problem hiding this comment.
Looks good – just one adjustment required
| login_err("https://valid-looking-url-but-not-actually.foo") | ||
| .await | ||
| .to_find_api_root_failure(), | ||
| FindApiRootFailure::FetchHomepage { .. } |
Contributor
There was a problem hiding this comment.
This should be NonExistentSiteError
Fixes issues with DNS resolution errors not being detected
jkmassel
approved these changes
Apr 14, 2025
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.
Uses #610 as a template to build on. Some of the tests in #610 were marked as
TODO, in which case I followed the Kotlin test implementation.The PR adds a flexible
MockRequestExecutorimplementation. It also adds someWpNetworkResponsehelpers similar to the ones in Kotlin.It removes the previous login tests since the spec tests cover the same basis.