Revamped tests and added a new one

This commit is contained in:
Max Jonas Werner committed 2019-04-16 10:49:58 +02:00
1 parent a5cb5cc6e0
commit e8a8e9ece9
2 files changed
+14 -7

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
#
# Regression test for https://github.com/spotify/docker-gc/issues/201
set -euxo pipefail
# when no volume exists then docker-gc should exit with status 0
REMOVE_VOLUMES=1 ./docker-gc
# when a volume exists it should be removed
docker volume create
if [[ $(docker volume ls --format "{{.Name}}" | wc -l) != 1 ]] ; then echo "Volume count is not 1" && exit 1 ; fi
REMOVE_VOLUMES=1 ./docker-gc
if [[ $(docker volume ls --format "{{.Name}}" | wc -l) != 0 ]] ; then echo "Volume has not been removed" && exit 1 ; fi
-7
View File
@@ -1,7 +0,0 @@
#!/bin/bash
#
# Regression test for https://github.com/spotify/docker-gc/issues/201
set -euxo pipefail
REMOVE_VOLUMES=1 ./docker-gc