You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Given #78 was discovered by a manual integration test, what do you think of a contribution to add some kind of integration test in github actions?
The general idea would be to compile and run docuum with a low threshold, pull a few images, then assert the oldest image was removed.
Not super familiar with the restrictions github actions places on docker access, but if I were to run the test locally, it would be:
#!/bin/bashset -Eeuo pipefail
cargo run -- "--threshold=50MB"&# ~27MB
docker run debian@sha256:05f7608c53541eab93132a7ed1de94f6881d1041b16a91e3294068e05ceba546 true# ~2MB
docker run alpine@sha256:a15790640a6690aa1730c38cf0a440e2aa44aaca9b0e8931a9f2b0d7cc90fd65 true# ~27MB
docker run ubuntu@sha256:60f560e52264ed1cb7829a0d59b1ee7740d7580e0eb293aca2d722136edb1e24 true
sleep 2
# Assert alpine and ubuntu still exist
docker inspect alpine@sha256:a15790640a6690aa1730c38cf0a440e2aa44aaca9b0e8931a9f2b0d7cc90fd65 > /dev/null
docker inspect ubuntu@sha256:60f560e52264ed1cb7829a0d59b1ee7740d7580e0eb293aca2d722136edb1e24 > /dev/null
# Assert debian was removed! docker inspect debian@sha256:05f7608c53541eab93132a7ed1de94f6881d1041b16a91e3294068e05ceba546 > /dev/null || { echo"The debian image should have been deleted.";false; }
kill$!
Alternatives considered
Could perform the test inside rust code (rather than bash scripting). More verbose, but safer.
If there's no easy way to start with a clean, image-free docker daemon inside github actions, maybe https://hub.docker.com/_/docker could be used?
Other testing strategies?
The text was updated successfully, but these errors were encountered:
In the past week or so, there has been quite a bit of activity in this repo: various PRs, feature requests, etc. Unfortunately it's starting to overwhelm me (since I have a full-time job that is unrelated to Docuum), but I'd love to do this as soon as I have time. Alternatively, I would welcome a PR for it.
I think the easiest way to implement this would be to simply add a new task in toast.yml. Then we could just run something like toast run-integration-tests to run the tests locally and in CI.
Description
Given #78 was discovered by a manual integration test, what do you think of a contribution to add some kind of integration test in github actions?
The general idea would be to compile and run docuum with a low threshold, pull a few images, then assert the oldest image was removed.
Not super familiar with the restrictions github actions places on docker access, but if I were to run the test locally, it would be:
Alternatives considered
The text was updated successfully, but these errors were encountered: