Add test: delete functionality

This commit is contained in:
Matthias Beyer 2016-02-05 21:44:15 +01:00
parent 6ec57c0bde
commit a59ce2003c

View file

@ -0,0 +1,29 @@
#!/usr/bin/env bash
source $(dirname ${BASH_SOURCE[0]})/utils.sh
create() {
imag-store create $*
}
delete() {
imag-store delete $*
}
test_delete_simple() {
local name="test~0.1.0"
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