t0030-mount.sh 754 Bytes
Newer Older
Christian Couder's avatar
Christian Couder committed
1 2 3 4 5 6 7 8
#!/bin/sh
#
# Copyright (c) 2014 Christian Couder
# MIT Licensed; see the LICENSE file in this repository.
#

test_description="Test mount command"

9
. lib/test-lib.sh
Christian Couder's avatar
Christian Couder committed
10

11
# if in travis CI, dont test mount (no fuse)
12 13
if ! test_have_prereq FUSE; then
	skip_all='skipping mount tests, fuse not available'
14

15
	test_done
16 17
fi

18
test_launch_ipfs_mount
Christian Couder's avatar
Christian Couder committed
19

20
test_kill_ipfs_mount
Christian Couder's avatar
Christian Couder committed
21

22 23 24 25 26 27
test_expect_success "mount directories can be removed" '
	rmdir ipfs ipns
'

test_launch_ipfs_daemon

28
test_expect_failure "'ipfs mount' fails when no mount dir (issue #341)" '
29 30 31
	test_must_fail ipfs mount >actual
'

32
test_expect_failure "'ipfs mount' looks good when it fails (issue #341)" '
33 34 35 36 37 38
	! grep "IPFS mounted at" actual &&
	! grep "IPNS mounted at" actual
'

test_kill_ipfs_mount

Christian Couder's avatar
Christian Couder committed
39
test_done