@cryptotaxi247 / kubo / commits / a86cde50d

test(files): add test for force flag

License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>

Overbool committed Oct 4, 2018 at 23:09 UTC a86cde50de4bd8da0b5eaf6f1936269bafd29c8e
1 file changed +14
test/sharness/t0250-files-api.sh
+14
@@ -629,6 +629,20 @@ test_files_api() {
629 test_expect_success "repo gc $EXTRA" '
630 ipfs repo gc
631 '
632 +
633 + # test rm
634 +
635 + test_expect_success "remove file forcibly" '
636 + echo "hello world" | ipfs files write --create /forcibly &&
637 + ipfs files rm --force /forcibly &&
638 + verify_dir_contents /
639 + '
640 +
641 + test_expect_success "remove directory forcibly" '
642 + ipfs files mkdir /forcibly-dir &&
643 + ipfs files rm --force /forcibly-dir &&
644 + verify_dir_contents /
645 + '
646 }
647
648 # test offline and online