Skip to content

chore(deps): update rust crate axum-test to v20 - autoclosed#67

Closed
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/axum-test-20.x
Closed

chore(deps): update rust crate axum-test to v20 - autoclosed#67
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/axum-test-20.x

Conversation

@renovate

@renovate renovate Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Type Update Change
axum-test dev-dependencies major 18.020.0

Release Notes

JosephLenton/axum-test (axum-test)

v19.1.0

Compare Source

  • Remove TestServer::scheme, as it never actually worked with http requests only mocked requests.
  • Remove TestRequest::scheme, as it never actually worked with http requests only mocked requests.
  • Mocked transport no longer provides the scheme and authority to the service, which matches the behaviour with Tokio / Hyper based services.
  • Mocked now provides the HOST header, which matches the behaviour with Hyper based HTTP services.

v19.0.0

  • Simplified constructors for TestServer, TestServerBuilder, and TestServerConfig.
    • 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.
  • TestResponse assertion functions now return &self, allowing calls to be chained!
  • Requests using Reqwest will now share cookies with regular Axum Test requests.
    • Cookies saved by one are saved to the other, and both adhere to TestServer::save_cookies() and TestServer::do_not_save_cookies() commands.
  • Improved error messages across the API.
    • JSON and Yaml assertions now output the body of the request when they fail.
  • Removed deprecated feature old-json-diff.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/axum-test-20.x branch from 51e8e87 to 997de3c Compare May 18, 2026 14:46
@renovate renovate Bot force-pushed the renovate/axum-test-20.x branch from 997de3c to de90908 Compare May 27, 2026 02:51

@doubleword-code doubleword-code Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR updates the axum-test dev dependency from version 18.x to 20.x. This is a major version upgrade that includes breaking API changes.

Verdict: Needs changes — The test code uses an outdated API pattern that, while still compiling, should be updated to match the new v20 API.

Research notes

I reviewed the API documentation for both axum-test v18.7.0 and v20.1.0:

  • v18.7.0: TestServer::new() returned Result<Self> and required error handling with ? or .unwrap()
  • v20.1.0: TestServer::new() returns Self directly (panics on failure). The fallible version is now try_new() which returns Result<Self>

Reference: https://docs.rs/axum-test/20.1.0/axum_test/struct.TestServer.html#method.new

The change was made to simplify the common case where server creation failures are exceptional and should panic rather than be handled gracefully in tests.

Suggested next steps

  1. Blocking: Update all TestServer::new(app).unwrap() calls to TestServer::new(app) in tests/integration_tests.rs - the .unwrap() is now redundant and should be removed for clarity.

  2. Consider running the full test suite after the update to ensure compatibility with the new version (though the existing usage pattern should continue to work).

General findings

The Cargo.lock shows this is a well-scoped dependency update with mostly transitive dependency changes. The core change is:

  • axum-test: 18.7.0 → 20.1.0
  • Removes smallvec dependency from axum-test
  • Updates various transitive dependencies (tokio, hyper, futures, etc.)

No breaking changes to your actual test logic are expected since you're using .unwrap() which masks the return type difference. However, the code should be cleaned up to use the new API properly.

General findings (auto-demoted from inline due to pre-validation)

  • Non-blocking tests/integration_tests.rs:169 — In axum-test v20, TestServer::new() returns Self directly instead of Result<Self>. The .unwrap() call is now redundant.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)

Comment thread Cargo.toml

[dev-dependencies]
axum-test = "18.0"
axum-test = "20.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: Consider pinning to a more specific version or using "20.1" to match what's in Cargo.lock.

Why it matters: You're specifying "20.0" but Cargo.lock has 20.1.0. While semver-compatible, being explicit helps with reproducibility and makes it clear which minor version you've tested against.

Suggested fix: Either:

  • axum-test = "20.1" (recommend if you want to stay current)
  • Or keep as-is and rely on Cargo.lock for exact versions (acceptable practice)

@renovate renovate Bot force-pushed the renovate/axum-test-20.x branch from de90908 to b0a478e Compare June 1, 2026 13:15

@doubleword-code doubleword-code Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR updates the axum-test dev-dependency from v18.7.0 to v20.1.0, a major version upgrade that includes breaking API changes. The most significant change is that TestServer::new() no longer returns a Result - it panics on failure instead. This means all 11 .unwrap() calls in the test file are now invalid and will cause compilation errors.

Verdict: Blocked - requires code changes to remove unnecessary .unwrap() calls before this can merge.

Research notes

  • axum-test v19.0.0 changelog: https://github.com/JosephLenton/axum-test/releases/tag/19.0.0

    • "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"
  • docs.rs v18.7.0 shows TestServer::new(app)? returning Result<Self>

  • docs.rs v20.1.0 shows TestServer::new(app) returning Self directly (panics on failure)

Suggested next steps

  1. Remove all .unwrap() calls from tests/integration_tests.rs where TestServer::new() is called (11 locations total)
  2. Run cargo test to verify tests compile and pass
  3. Optionally consider using TestServer::try_new() if explicit error handling is preferred in any test

General findings

The dependency update itself appears sound - axum-test v20.1.0 is compatible with axum v0.8.9 which is already in use. The Cargo.lock shows appropriate transitive dependency updates (tokio, hyper, serde_json, etc.). No security concerns identified with the updated packages.

General findings (auto-demoted from inline due to pre-validation)

  • Blocking tests/integration_tests.rs:169 — In axum-test v19+, TestServer::new() no longer returns a Result - it panics on failure. Calling .unwrap() on the return value will cause a compilation error because TestServer doesn't have an unwrap() method.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:199 — Same issue as line 169 - TestServer::new() no longer returns a Result in axum-test v19+, so .unwrap() is invalid.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:242 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:276 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:310 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:366 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:401 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:436 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:494 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:523 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)
  • Blocking tests/integration_tests.rs:804 — Same issue - remove .unwrap() since TestServer::new() now returns TestServer directly.
    • (demoted: path "tests/integration_tests.rs" is not in the PR diff)

@renovate renovate Bot changed the title chore(deps): update rust crate axum-test to v20 chore(deps): update rust crate axum-test to v20 - autoclosed Jun 25, 2026
@renovate renovate Bot closed this Jun 25, 2026
@renovate renovate Bot deleted the renovate/axum-test-20.x branch June 25, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants