chore(deps): update rust crate axum-test to v20#946
Conversation
Deploying control-layer with
|
| Latest commit: |
2bc4062
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4e7e27b0.control-layer.pages.dev |
| Branch Preview URL: | https://renovate-axum-test-20-x.control-layer.pages.dev |
a59c454 to
2efe1d1
Compare
30e5247 to
6839dc0
Compare
36ca08d to
0189aae
Compare
00d591c to
e01374f
Compare
There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from v18.4.1 to v20.0.0. This is a major version bump that aligns with the project's current axum v0.8.9 version (axum-test v20 requires axum v0.8.8+ per the official README).
Verdict: Ready to approve pending CI verification.
Research notes
- Fetched axum-test v20.0.0 docs.rs documentation - confirmed all assertion methods used in this codebase (
assert_status_ok,assert_status_bad_request,assert_status_forbidden,assert_status_not_found,assert_status_unauthorized,assert_status(StatusCode::CREATED),assert_text, etc.) remain available and unchanged - Fetched axum-test README - confirmed version compatibility matrix shows axum-test v20.0.0 requires axum v0.8.8+, and this project uses axum v0.8.9 (verified in Cargo.lock)
- Compared axum-test v19.0.0 and v20.0.0 docs - no breaking API changes affecting the usage patterns in this codebase
Suggested next steps
- Run
cargo testto verify all tests pass with the updated dependency (requires Rust toolchain and PostgreSQL) - Update Cargo.lock by running
cargo checkorcargo update -p axum-test - If tests pass, merge this PR
General findings
No issues identified. The update is straightforward because:
- The project's axum version (v0.8.9) is within the compatible range for axum-test v20.0.0
- All ~57 usages of
TestServer::new()across the codebase use the same signature that exists in v20 - All ~800 usages of assertion methods (
assert_*) use APIs that are documented as present in v20.0.0 - The multipart testing utilities (
axum_test::multipart::Part,axum_test::multipart::MultipartForm) are also present in v20 per docs.rs
This appears to be a routine dependency update with no breaking changes for this codebase's usage patterns.
There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from version 18.4.1 to 20.0.0, a major version bump that skips version 19 entirely. The change is minimal (single line in Cargo.toml), but major version upgrades typically indicate breaking changes that may require code modifications.
Verdict: Needs verification before merge - cannot approve without confirmation that tests compile and pass with the new version.
Research notes
I reviewed the axum-test v20.0.0 documentation on docs.rs:
- TestServer API - Core methods like
new(),get(),post(),add_header(), etc. remain unchanged - Multipart module -
PartandMultipartFormtypes still exist with similar API - The library continues to support
axum::Router,IntoMakeService, and other types used in this codebase
The changelog was not accessible via webfetch, which limits visibility into what breaking changes occurred between v18 → v20.
Suggested next steps
- Run cargo build/test locally to verify the code compiles with axum-test v20.0.0 (this is critical since Rust is not available in this review environment)
- Check if v19 exists and why it's being skipped - typically Renovate should upgrade through intermediate major versions unless configured otherwise
- Verify test suite passes - especially tests using multipart forms (
batches.rs,files.rs) andTestServer::new()patterns
General findings
Potential risk: Major version skip without code changes
The jump from 18.4.1 to 20.0.0 bypasses an entire major version (v19). While the core API appears stable based on documentation review, this pattern is unusual and suggests either:
- v19 had issues and v20 is the stable upgrade target
- Renovate was configured to skip v19 for some reason
- The maintainer jumped directly to v20
Without access to the changelog or ability to run tests, there's uncertainty about whether breaking changes affect this codebase's usage patterns.
Usage patterns in this codebase
The codebase uses axum-test extensively:
TestServer::new(service)- ~15 occurrences across test filesaxum_test::multipart::PartandMultipartForm- heavy usage in batches.rs and files.rs testsTestResponsemethods (status_code(),json(),text(),await)
All these APIs exist in v20.0.0 based on the documentation, suggesting good compatibility. However, signature changes (e.g., return types, trait bounds) would only be caught at compile time.
Recommendation
If the test suite passes locally with this version, the PR is safe to merge. The documentation suggests API stability, but empirical verification is essential for a major version upgrade.
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } |
There was a problem hiding this comment.
Non-blocking: Major version upgrade from 18.4.1 to 20.0.0 (skipping v19).
Why it matters: Major version bumps typically indicate breaking changes. While the axum-test v20 documentation shows the same core APIs this codebase uses (TestServer::new, multipart::Part, MultipartForm), there could be signature changes, trait bound modifications, or behavioral differences not visible from documentation alone. Skipping v19 entirely is unusual and warrants checking the changelog to understand what changed.
Suggested fix: Verify locally that cargo build and cargo test succeed with this version before merging. If possible, check the axum-test GitHub repository changelog to confirm v19 was intentionally skipped and understand what breaking changes were introduced in v19/v20.
There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from version 18.4.1 to 20.0.0 - a major version jump spanning two major releases (v18 → v19 → v20). The change is a single-line update in dwctl/Cargo.toml.
Verdict: Needs changes - the axum version constraint should be tightened to ensure compatibility with axum-test v20.
Research notes
I fetched the axum-test README which contains an explicit compatibility table:
| Axum Version | Axum Test Version |
|---|---|
| 0.8.8+ (latest) | 20.0.0 (latest) |
| 0.8.8+ | 19.0.0 |
| 0.8.7 | 18.3.0 |
| 0.8.4 | 18.0.0 |
This shows axum-test v20.0.0 requires axum v0.8.8+, while the previous v18.x series was designed for axum v0.8.4–v0.8.7.
The codebase currently declares axum = { version = "0.8", ... } which uses Cargo's default SemVer resolution and could theoretically resolve to any 0.8.x version. While Cargo will typically resolve to the latest compatible version (and thus satisfy the requirement), explicitly documenting this dependency relationship prevents future confusion and ensures CI builds remain reproducible.
The codebase extensively uses axum_test::TestServer (~57 occurrences of TestServer::new()) and axum_test::multipart::MultipartForm (~50+ occurrences) throughout the test suite. No API changes appear necessary for these usages based on the documented API surface.
Suggested next steps
- Blocking: Update the
axumdependency constraint from"0.8"to"0.8.8"to explicitly match axum-test v20's minimum requirement. - Run
cargo testto verify all tests pass with the updated dependency versions. - Consider running
cargo updateto ensureCargo.lockreflects the correct resolved versions.
General findings
None - the change is isolated to the dev-dependency version. All usages of axum_test::TestServer and axum_test::multipart in the codebase follow standard patterns that should remain compatible.
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } |
There was a problem hiding this comment.
Blocking: This update to axum-test v20.0.0 requires axum v0.8.8+ according to the official compatibility table, but the current axum dependency is declared as version = "0.8" which could resolve to earlier 0.8.x versions.
Why it matters: If Cargo resolves axum to a version < 0.8.8 (e.g., in a clean build or CI environment with cached lock files), there may be API incompatibilities between axum and axum-test that cause compilation failures or subtle runtime issues in tests. The axum-test library tightly couples to specific axum versions because it needs to understand axum's internal service types.
Suggested fix: Update the axum dependency to explicitly require v0.8.8+:
axum = { version = "0.8.8", features = ["multipart"] }This ensures both the production dependency and test dependency are aligned with their mutual compatibility requirements.
There was a problem hiding this comment.
Summary
This PR upgrades axum-test from v18.4.1 to v20.0.0, a major version bump for the test framework dependency. After reviewing the extensive usage of axum_test throughout the codebase (~162 usages including TestServer, multipart forms, and response assertions), the core API surface appears stable across this version boundary. The upgrade aligns with axum v0.8.x which the project already uses.
Verdict: Approved pending test verification - this is a routine dependency upgrade with low risk since it only affects dev dependencies and the axum-test API has maintained backward compatibility for the patterns used here.
Research notes
- axum-test v20.0.0 depends on
axum ^0.8.8, compatible with this codebase'saxum = { version = "0.8" } - Core APIs used (
TestServer::new(),TestRequest::multipart(),TestResponse::assert_status(),TestResponse::json()) remain stable - No migration guide or breaking changes documented for typical usage patterns between v18→v20
- The version jump likely reflects alignment with axum ecosystem versioning rather than breaking internal changes
Suggested next steps
- Run
just test rustto verify all tests compile and pass with the new version - Run
just ci rustto ensure the full CI pipeline passes - Verify no deprecation warnings appear during compilation
General findings
None - this is a clean dependency upgrade with no code changes required.
There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from version 18.4.1 to 20.0.0 in dwctl/Cargo.toml. This is a major version upgrade spanning two major versions (18 → 19 → 20), which introduces breaking API changes that will require code modifications throughout the test suite.
Verdict: Blocked - The upgrade cannot be applied without accompanying code changes to handle the breaking API changes introduced in axum-test v19.0.0.
Research notes
I researched the axum-test changelog via GitHub Releases and crates.io:
-
v19.0.0 (published 2026-02-27): Release notes
TestServer::new()constructor no longer returns a Result - it now panics on failure- Added
try_new()for those who need Result handling TestResponseassertion functions now return&selffor chaining (backwards compatible)- Cookie sharing improvements between Reqwest and regular requests
- Improved error messages
-
v19.1.0 (published 2026-03-05):
- Removed
TestServer::scheme()andTestRequest::scheme()(never worked for HTTP requests) - Mocked transport no longer provides scheme/authority to service
- Mocked transport now provides
HOSTheader
- Removed
-
v20.0.0: No public release notes found on GitHub (tag may not exist yet), but exists on crates.io
Suggested next steps
-
Update all
TestServer::new()calls to remove.expect()/.unwrap()since v19+ returnsTestServerdirectly, notResult<TestServer, Error>- Found ~46 instances using
.expect()or.unwrap()across the codebase - Example fix: Change
TestServer::new(router).expect("...")to justTestServer::new(router)
- Found ~46 instances using
-
Alternatively, use
try_new()if you want to preserve explicit error handling in tests- Example:
TestServer::try_new(router).expect("Failed to create test server")
- Example:
-
Review any usage of removed methods:
- Check for any
TestServer::scheme()orTestRequest::scheme()calls (none found in initial scan)
- Check for any
-
Run full test suite after making changes to verify compatibility with v20.0.0
General findings
Breaking Change: TestServer::new() signature change (Blocking)
The most impactful change is in v19.0.0 where TestServer::new() was simplified to panic on failure rather than return a Result. This affects approximately 46 test locations across the codebase:
Affected files:
dwctl/src/error_enrichment.rs- 6 instancesdwctl/src/lib.rs- 1 instancedwctl/src/test/mod.rs- 4+ instancesdwctl/src/api/handlers/auth.rs- 20+ instances- Other test files
Current pattern (v18.x):
let server = axum_test::TestServer::new(router).expect("Failed to create test server");Required pattern (v19+):
let server = axum_test::TestServer::new(router);
// or if you prefer explicit error handling:
let server = axum_test::TestServer::try_new(router).expect("Failed to create test server");The multipart API (axum_test::multipart::Part, MultipartForm) appears unchanged and should continue working without modification.
Non-blocking observations
- The assertion method return type change in v19.0.0 (now returning
&selffor chaining) is backwards compatible - existing code that doesn't chain will continue to work - No usage of the removed
scheme()methods was found in the codebase - The
axum-testcrate continues to support axum 0.8.x which this project uses
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } |
There was a problem hiding this comment.
Blocking: Major version upgrade from 18.4.1 to 20.0.0 introduces breaking API changes that require code modifications.
Why it matters: In axum-test v19.0.0, TestServer::new() was changed to no longer return a Result - it now panics on failure or returns TestServer directly. The current codebase has ~46 instances of TestServer::new(...).expect(...) or .unwrap() that will fail to compile with this upgrade because you can't call .expect() on a non-Result type.
Per the v19.0.0 release notes: "new() constructor no longer returns a Result, and instead panics on failure. Added try_new() to allow people to continue to catch the Result if needed."
Suggested fix: Either:
- Remove
.expect()/.unwrap()from allTestServer::new()calls (simplest) - Replace with
TestServer::try_new()if explicit error handling is preferred
Example change:
// Before (v18.x)
let server = TestServer::new(router).expect("Failed to create test server");
// After (v19+)
let server = TestServer::new(router);
// OR
let server = TestServer::try_new(router).expect("Failed to create test server");There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from v18.4.1 to v20.0.0, skipping the intermediate v19 major release. This is a two-major-version upgrade that includes breaking changes in the API.
Verdict: Needs changes — The upgrade introduces breaking API changes that require code modifications. The current code uses .expect() on TestServer::new() calls, but v19+ changed this constructor to panic directly instead of returning a Result, making the .expect() call technically incorrect (though it will still compile due to Into conversions). More importantly, there may be behavioral changes in the mocked transport layer that could affect test behavior.
Research notes
Fetched axum-test documentation and release notes:
-
v19.0.0 breaking changes (GitHub Releases):
TestServer::new()no longer returnsResult— panics on failure;try_new()added for Result-based constructionTestServer::scheme()andTestRequest::scheme()removed ("never actually worked" with HTTP requests)- Mocked transport no longer provides scheme/authority to service (matches Tokio/Hyper behavior)
- Mocked transport now provides HOST header (matches Hyper behavior)
- TestResponse assertion functions return
&selffor chaining
-
v20.0.0: Depends on axum v0.8.x (confirmed via docs.rs), which aligns with this project's axum v0.8 usage
-
Current usage patterns found in codebase (162 occurrences of axum_test):
- 11 instances of
TestServer::new(...).expect("...")pattern that need attention - No usage of
.scheme()method detected (good — no removal impact) - Heavy use of multipart forms (
axum_test::multipart::MultipartForm) — still supported per docs.rs
- 11 instances of
Suggested next steps
-
Update constructor calls (Blocking): Change all
TestServer::new(...).expect("...")patterns to either:- Just
TestServer::new(...)(let it panic naturally on failure), or TestServer::try_new(...)?if you want explicit error handling in tests
- Just
-
Run full test suite (Blocking): Verify all 162 usages still work correctly, especially:
- Tests using mocked transport (behavioral change in HOST header / scheme handling)
- Multipart form tests (files.rs has extensive multipart usage)
- Any tests asserting on request properties that might be affected by transport changes
-
Check for silent behavioral changes (Non-blocking): Review tests that might depend on:
- Request scheme values (now not provided in mocked transport)
- Authority/host header behavior (now matches Hyper behavior)
General findings
- No changelog reference in PR description: For dependency upgrades, especially major versions, it's helpful to include a summary of breaking changes or link to the upstream changelog
- Single-line change masks significant impact: While only one line changed in Cargo.toml, this represents a substantial upgrade that affects the entire test infrastructure
- No test file modifications: The absence of test code changes suggests either the upgrade was assumed seamless, or tests haven't been run yet to verify compatibility
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } |
There was a problem hiding this comment.
Blocking: Major version upgrade from v18.4.1 to v20.0.0 requires code changes.
Why it matters: axum-test v19 introduced breaking changes that affect how TestServer::new() is used. The old API returned Result<TestServer, Error> requiring .expect() or ?, but v19+ changed to direct panic on failure with a new try_new() method for Result-based handling.
The codebase has 11 instances of TestServer::new(...).expect("Failed to create test server") across:
src/test/mod.rs(4 instances)src/lib.rs(1 instance)src/error_enrichment.rs(6 instances)
While these will still compile (due to Into trait conversions), the pattern is now semantically incorrect.
Suggested fix: Either:
- Remove
.expect()calls:let server = TestServer::new(router); - Or use new API:
let server = TestServer::try_new(router)?;(if you want explicit error handling)
Additionally, run the full test suite to verify behavioral changes in the mocked transport layer don't break any tests.
There was a problem hiding this comment.
Summary
This PR updates the axum-test dev dependency from v18.4.1 to v20.0.0. This is a minor version bump that aligns the test framework with the axum 0.8.8+ compatibility requirements documented in the axum-test README.
Verdict: Needs changes - the axum dependency should be pinned to ensure compatibility.
Research notes
From the axum-test repository README:
| Axum Version | Axum Test Version |
|---|---|
| 0.8.8+ (latest) | 20.0.0 (latest) |
| 0.8.8+ | 19.0.0 |
| 0.8.7 | 18.3.0 |
The key finding is that axum-test v20.0.0 requires axum 0.8.8 or higher, but the project's current axum dependency specification axum = { version = "0.8", ... } allows Cargo to resolve to any 0.8.x version, potentially including versions below 0.8.8.
The API surface of axum-test appears stable between v18 and v20 - the core TestServer::new(), TestRequest, and TestResponse types maintain the same interface, so existing test code should continue to work without modification.
Suggested next steps
- Blocking: Update the axum dependency to specify minimum version 0.8.8 to ensure compatibility with axum-test v20.0.0
- Run
cargo testto verify all tests pass with the updated dependencies
General findings
None - the change is minimal and focused. The only concern is ensuring the axum dependency version constraint is compatible.
|
|
||
| [dev-dependencies] | ||
| axum-test = { version = "18.4.1" } | ||
| axum-test = { version = "20.0.0" } |
There was a problem hiding this comment.
Blocking: axum-test v20.0.0 requires axum 0.8.8+ according to the axum-test compatibility table, but the axum dependency on line 21 is specified as version = "0.8" which could resolve to versions lower than 0.8.8.
Why it matters: If Cargo resolves axum to a version below 0.8.8 (e.g., 0.8.0-0.8.7), the build will fail due to version incompatibility between axum and axum-test. This creates an unstable build that depends on what version Cargo happens to resolve.
Suggested fix: Update the axum dependency on line 21 to specify the minimum compatible version:
axum = { version = "0.8.8", features = ["multipart"] }Alternatively, if you want to keep the broader 0.8 range, you should pin axum-test to v19.0.0 instead, which supports axum 0.8.8+ but may work with earlier 0.8.x versions.
This PR contains the following updates:
18.4.1→20.0.0Release Notes
JosephLenton/axum-test (axum-test)
v19.1.0Compare Source
TestServer::scheme, as it never actually worked with http requests only mocked requests.TestRequest::scheme, as it never actually worked with http requests only mocked requests.HOSTheader, which matches the behaviour with Hyper based HTTP services.v19.0.0TestServer,TestServerBuilder, andTestServerConfig.new()constructor no longer returns a Result, and instead panics on failure.try_new()to allow people to continue to catch the Result if needed.TestResponseassertion functions now return&self, allowing calls to be chained!TestServer::save_cookies()andTestServer::do_not_save_cookies()commands.old-json-diff.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.