mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-20 10:42:11 +08:00
test(files): add test for force flag
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user