diff options
Diffstat (limited to 'bin/core/imag-store/tests/003-delete_test.sh')
-rw-r--r-- | bin/core/imag-store/tests/003-delete_test.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/core/imag-store/tests/003-delete_test.sh b/bin/core/imag-store/tests/003-delete_test.sh new file mode 100644 index 00000000..a3d890e5 --- /dev/null +++ b/bin/core/imag-store/tests/003-delete_test.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +source $(dirname ${BASH_SOURCE[0]})/../../tests/utils.sh +source $(dirname ${BASH_SOURCE[0]})/utils.sh + +create() { + imag-store create $* +} + +delete() { + imag-store delete $* +} + +test_delete_simple() { + local name="test" + + create -p $name + delete --id $name + + local n=$($(find ${STORE}/ -type f | wc -l)) + if [[ $n -eq 0 ]]; then + success "Deleting worked" + else + err "There are still $n files in the store" + fi +} + +invoke_tests \ + test_delete_simple + |