-
Notifications
You must be signed in to change notification settings - Fork 3
Application passwords: Create
, Delete
, Retrieve
& Update
#162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
jkmassel
approved these changes
Jul 4, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests work, and I implemented the Swift side of things which worked great in that example app
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.
This PR builds on #155 to add the remaining endpoints for Application Passwords. It includes all the necessary unit and integration tests in Rust and a few integration tests in Kotlin. Since we are generating all the necessary implementations for an endpoint, there is very little implementation on the library side.
Here is a list of changes - some of which didn't need to happen in this PR, but they are very straightforward, so it shouldn't be difficult to review them:
uuid
for the application password which is used for validation in application password integration tests.immut
&err
tests asparallel
;mut
tests asserial
. These markings ensure that allserial
tests are run sequentially and noparallel
tests are run whileserial
tests are being run. Any test that doesn't have a mark may run at any point - so these should be tests that won't get impacted by other conditions, such as thewp_contextual
&wp_derive_request_builder
tests. Technicallylogin_immut
tests wouldn't be impacted by other tests either, but I marked them asparallel
as well for consistency. With this change, we no longer need to pass in--test-threads 1
argument while runningcargo test
.wp_cli
instead of relying on DB queries.expected_status_code_for_wp_rest_error_code
integration test helper to return an array slice instead of a single status code. I was expecting to make this change at some point, and surprised that it took this long. There is no assigned status code for an error in WordPress source code, and under different conditions, different status codes might be reported for the same error.To Test
make test-server && make dump-mysql && make backup-wp-content-plugins
cargo test
cd native/kotlin && ./gradlew :api:kotlin:integrationTest