-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sqlx::test error message incorrectly implies migrate
feature is disabled
#3275
Comments
migrate
feature is disabled
Also experiencing this issue, though only when the fixtures argument is passed. It does not occur with a plain Does not cause the error message: Edit: This was resolved by adding a pool: PgPool arg to the test function signature. |
Yep, the code path that leads to the incorrect error is only triggered when the |
Bug Description
Summary
Error message implies that the "migrate" feature isn't enabled when it actually is. When the feature isn't enabled, the error doesn't mention that it's necessary.
Detail
I am receiving the following error message when I use
cargo test
:This error is generated on
test_attr.rs
:36:However, my setup DOES include the default
migrate
feature.Cargo.toml
The code above appears to give the extra "unless the
migrate
feature is enabled" wording only when… the migrate feature is enabled. (if cfg!(feature = "migrate")
) However, the time when that caveat is relevant is when themigrate
feature is not enabled. Otherwise, the error should just point to "automatic test DB management" as the issue.Minimal Reproduction
Cargo.toml
as above, withmain.rs
:Info
default
, andruntime-tokio-rustls
rustc --version
: rustc 1.78.0 (9b00956e5 2024-04-29)The text was updated successfully, but these errors were encountered: