2016-02-05 20:44:15 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2016-04-14 15:22:47 +00:00
|
|
|
source $(dirname ${BASH_SOURCE[0]})/../../tests/utils.sh
|
2016-02-05 20:44:15 +00:00
|
|
|
source $(dirname ${BASH_SOURCE[0]})/utils.sh
|
|
|
|
|
|
|
|
create() {
|
|
|
|
imag-store create $*
|
|
|
|
}
|
|
|
|
|
|
|
|
delete() {
|
|
|
|
imag-store delete $*
|
|
|
|
}
|
|
|
|
|
|
|
|
test_delete_simple() {
|
2016-09-04 22:36:45 +00:00
|
|
|
local name="test"
|
2016-02-05 20:44:15 +00:00
|
|
|
|
2016-08-26 11:41:50 +00:00
|
|
|
create -p $name
|
|
|
|
delete --id $name
|
2016-02-05 20:44:15 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|