r/programming • • Jul 25 '26

Delightful integration tests in Rust

https://github.com/alexpusch/rust-magic-patterns/blob/master/delightful-integration-tests/Readme.md
0 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/kuikuilla Jul 28 '26

But I don't really understand why specifics like rabbitmq:3.8.22-management and the 5672/tcp should be part of the source code.

I'm sure you could make those configurable but for integration tests I probably wouldn't bother either.

Should stuff like that not better reside in some configuration format

I think the whole point of this is that the rust test code manages the lifetime of the depedencies that the integration test needs. Then you have a single entry point you just run and everyting just works. No need to run scripts to setup the testing environment, just click "run test" in whatever IDE you use (or use cargo test).