snok / container-retention-policy

GitHub action for pruning old GHCR container image versions.
MIT License
186 stars 30 forks source link

Fix tests calling nonexistent or old binary build #87

Closed rkarp closed 3 months ago

rkarp commented 3 months ago

Binaries are not built by default with cargo test, unless there are integration tests to be executed, see: https://doc.rust-lang.org/cargo/commands/cargo-test.html#target-selection

So the test was relying on previous binary builds (cargo build). Now it will always use an up to date binary since it's an integration test. See also: https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html

sondrelg commented 3 months ago

I didn't know about this. Cheers @rkarp!