From 8fd6fdb38560339c232299c54fd91dfd44fa643c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 1 Feb 2018 12:56:20 +0100 Subject: [PATCH] add tests for ipfs files stat --with-local MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit License: MIT Signed-off-by: Michael Muré --- test/sharness/t0250-files-api.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/sharness/t0250-files-api.sh b/test/sharness/t0250-files-api.sh index a1e813fe5..e44bf1fc0 100755 --- a/test/sharness/t0250-files-api.sh +++ b/test/sharness/t0250-files-api.sh @@ -154,6 +154,15 @@ test_files_api() { ipfs files stat --hash / > roothash ' + test_expect_success "stat works outside of MFS" ' + ipfs files stat /ipfs/$DIR1 + ' + + test_expect_success "stat compute the locality of a dag" ' + ipfs files stat --with-local /ipfs/$DIR1 > output + grep -q "(100.00%)" output + ' + test_expect_success "cannot mkdir / $EXTRA" ' test_expect_code 1 ipfs files mkdir $ARGS / '