From 65d396ab409cba973b0e7424dc59504604e953d6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 8 Mar 2022 11:05:10 +0500 Subject: t/i/docker: clean up Docker data --- test/integration/docker/test.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3