1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-20 19:19:06 +08:00

test(files): add test for force flag

License: MIT
Signed-off-by: Overbool <overbool.xu@gmail.com>
This commit is contained in:
Overbool
2018-10-04 23:09:39 +08:00
parent bd23e7d2ed
commit a86cde50de

View File

@ -629,6 +629,20 @@ test_files_api() {
test_expect_success "repo gc $EXTRA" '
ipfs repo gc
'
# test rm
test_expect_success "remove file forcibly" '
echo "hello world" | ipfs files write --create /forcibly &&
ipfs files rm --force /forcibly &&
verify_dir_contents /
'
test_expect_success "remove directory forcibly" '
ipfs files mkdir /forcibly-dir &&
ipfs files rm --force /forcibly-dir &&
verify_dir_contents /
'
}
# test offline and online