Commit 7e46d951 authored by Christian Couder's avatar Christian Couder Committed by Juan Batiz-Benet

Use a FUSE prerequisite to skip mount tests

When there is no fuse we should skip all mount
tests and using a FUSE prerequisite is a good
way to do that.
parent fc6213db
......@@ -9,7 +9,7 @@ test_description="Test mount command"
. ./test-lib.sh
# if in travis CI, dont test mount (no fuse)
if test "$TEST_NO_FUSE" = 1; then
if ! test_have_prereq FUSE; then
skip_all='skipping mount tests, fuse not available'
test_done
......
......@@ -30,11 +30,11 @@ test_expect_success "ipfs cat output looks good" '
test_cmp expected actual
'
test_expect_success "cat ipfs/stuff succeeds" '
test_expect_success FUSE "cat ipfs/stuff succeeds" '
cat ipfs/$HASH >actual
'
test_expect_success "cat ipfs/stuff looks good" '
test_expect_success FUSE "cat ipfs/stuff looks good" '
test_cmp expected actual
'
......@@ -71,11 +71,11 @@ test_expect_success "ipfs cat output looks good" '
test_cmp sha1_expected sha1_actual
'
test_expect_success "cat ipfs/bigfile succeeds" '
test_expect_success FUSE "cat ipfs/bigfile succeeds" '
cat ipfs/$HASH | shasum >sha1_actual
'
test_expect_success "cat ipfs/bigfile looks good" '
test_expect_success FUSE "cat ipfs/bigfile looks good" '
test_cmp sha1_expected sha1_actual
'
......
......@@ -16,6 +16,8 @@ SHARNESS_LIB="./sharness.sh"
# Please put go-ipfs specific shell functions below
test "$TEST_NO_FUSE" != 1 && test_set_prereq FUSE
test_cmp_repeat_10_sec() {
for i in 1 2 3 4 5 6 7 8 9 10
do
......@@ -38,11 +40,11 @@ test_launch_ipfs_mount() {
ipfs config Mounts.IPNS "$(pwd)/ipns"
'
test_expect_success "ipfs mount succeeds" '
test_expect_success FUSE "ipfs mount succeeds" '
ipfs mount mountdir >actual &
'
test_expect_success "ipfs mount output looks good" '
test_expect_success FUSE "ipfs mount output looks good" '
IPFS_PID=$! &&
echo "mounting ipfs at $(pwd)/ipfs" >expected &&
echo "mounting ipns at $(pwd)/ipns" >>expected &&
......@@ -52,11 +54,11 @@ test_launch_ipfs_mount() {
test_kill_ipfs_mount() {
test_expect_success "ipfs mount is still running" '
test_expect_success FUSE "ipfs mount is still running" '
kill -0 $IPFS_PID
'
test_expect_success "ipfs mount can be killed" '
test_expect_success FUSE "ipfs mount can be killed" '
kill $IPFS_PID &&
sleep 1 &&
! kill -0 $IPFS_PID 2>/dev/null
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment