Merge wp_networking
crate into wp_api
#100
Merged
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.
Builds on #99.
wp_networking
was initially separated, so we could thewp_api
as a dependency crate, rather than an internal one. Later onwp_networking
became an integration test suite and in Rust, integration tests already treat the crate as a dependency, so there is no benefit left in keeping them separate.The PR merges
wp_networking
intowp_api
by:wp_networking
dependencies towp_api
'sdev-dependencies
.tests
folder as a whole towp_api
.wp_networking/src/lib.rs
totests/test_helpers
. Note the only implementation here wasAsyncWPNetworking
which for now is only needed for integration tests. I think one day we might add a default client towp_api
itself, but for now this should be enough.As a bonus, I've renamed the
src/test_helpers
tosrc/unit_test_common
in 1c0f443 andtests/test_helpers
totests/integration_test_common
in 8da085a. Both of these modules having the same name was very annoying when browsing the code and I'd like to move away from thehelper
suffix as much as possible, so I picked these for now. Happy to change it again if you have a suggestion for a better name.To Test
make test-server && make dump-mysql && make backup-wp-content-plugins
cargo test --test '*' -- --nocapture --test-threads 1