aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-08 11:05:10 +0500
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-08 11:05:10 +0500
commit65d396ab409cba973b0e7424dc59504604e953d6 (patch)
tree423eb07b5a2d140a26adcacd3770b952176c60fb /test
parenttest/integration: more obvious success indication (diff)
downloadcgitize-65d396ab409cba973b0e7424dc59504604e953d6.tar.gz
cgitize-65d396ab409cba973b0e7424dc59504604e953d6.zip
t/i/docker: clean up Docker data
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/docker/test.sh12
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