sqlx
sqlx copied to clipboard
"stabilize" the sqlx::testing module
Hi there! I was recently trying to combine proptest & the sqlx::test macro, and while the macro is great usually since proptest needs to run the test many times it would be nice to have more manual control over how the test is initialized. We are currently using proptest to do e2e tests of one of our backends, and since it quite frequently runs into conflicts with data already being there because of previous runs (and error cases saved which do always create the same data) the sqlx::test macro would in principle be the perfect solution.
I think just "stabilizing" the existing testing module would be great, as currently with it hidden from the docs i am hesitant to rely on it being stable over version upgrades.
If that is not desired one alternative may be just giving it the same semver guarantees (does it have that already, if so it would be amazing if someone could document that somewhere?) that the sqlx::test macro does have.
I think that would be quite a reasonable addition which could hopefully provide some value to others as well
If that is welcome that would be great, and if there are some steps that need to be done for that I could try to work on them if someone gives me a rough outline of them :)
I'm not interested in stabilizing the current testing infrastructure. It hasn't had a proper design pass and was mostly just hacked together to make #[sqlx::test] work.
I'm not interested in stabilizing the current testing infrastructure. It hasn't had a proper design pass and was mostly just hacked together to make
#[sqlx::test]work.
I'd appreciate it if you could give us a steer on what you might recommend instead for testing. I've found that even with it's limitations #[sqlx::test] is super helpful and convenient.