diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-08 11:05:10 +0500 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-03-08 11:05:10 +0500 |
commit | 65d396ab409cba973b0e7424dc59504604e953d6 (patch) | |
tree | 423eb07b5a2d140a26adcacd3770b952176c60fb /test | |
parent | test/integration: more obvious success indication (diff) | |
download | cgitize-65d396ab409cba973b0e7424dc59504604e953d6.tar.gz cgitize-65d396ab409cba973b0e7424dc59504604e953d6.zip |
t/i/docker: clean up Docker data
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/docker/test.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/integration/docker/test.sh b/test/integration/docker/test.sh index 32680f7..4f24cf6 100755 --- a/test/integration/docker/test.sh +++ b/test/integration/docker/test.sh @@ -37,7 +37,10 @@ cleanup() { remove_ssh_keys kill_ssh_agent + docker_cleanup + rm -rf -- "$output_dir" + popd > /dev/null } generate_ssh_keys() { @@ -113,6 +116,12 @@ docker_build() { docker-compose build } +docker_cleanup() { + dump 'cleaning up Docker data' + docker-compose down --rmi all --volumes + # Use `docker system prune` as well? +} + setup() { generate_ssh_keys setup_ssh_agent @@ -159,13 +168,12 @@ verify() { } main() { - trap cleanup EXIT pushd -- "$script_dir" > /dev/null + trap cleanup EXIT setup run verify success - popd > /dev/null } main |