Replace fsh with test_fsh in sharness tests
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Christian Couder committed
Jan 24, 2015 at 21:19 UTC
fa13afa5cabaf04077b8f968da61585cb97dce51
7 files changed
+10
-10
test/sharness/README.md
+2
-2
@@ -52,12 +52,12 @@ test_expect_success ".go-ipfs/ has been created" '
52
test -d ".go-ipfs" &&
53
test -f ".go-ipfs/config" &&
54
test -d ".go-ipfs/datastore" ||
55
- fsh ls -al .go-ipfs
55
+ test_fsh ls -al .go-ipfs
56
'
57
```
58
59
The `|| ...` is a diagnostic run when the preceding command fails.
60
-`bin/fsh` is a trivial script that echoes the args, runs the cmd,
60
+test_fsh is a shell function that echoes the args, runs the cmd,
61
and then also fails, making sure the test case fails. (wouldnt want
62
the diagnostic accidentally returning true and making it _seem_ like
63
the test case succeeded!).
test/sharness/t0010-basic-commands.sh
+2
-2
@@ -18,7 +18,7 @@ test_expect_success "ipfs version succeeds" '
18
19
test_expect_success "ipfs version output looks good" '
20
cat version.txt | egrep "^ipfs version [0-9]+\.[0-9]+\.[0-9]" >/dev/null ||
21
- fsh cat version.txt
21
+ test_fsh cat version.txt
22
'
23
24
test_expect_success "ipfs help succeeds" '
@@ -28,7 +28,7 @@ test_expect_success "ipfs help succeeds" '
28
test_expect_success "ipfs help output looks good" '
29
cat help.txt | egrep -i "^Usage:" >/dev/null &&
30
cat help.txt | egrep "ipfs .* <command>" >/dev/null ||
31
- fsh cat help.txt
31
+ test_fsh cat help.txt
32
'
33
34
test_done
test/sharness/t0020-init.sh
+1
-1
@@ -18,7 +18,7 @@ test_expect_success ".go-ipfs/ has been created" '
18
test -d ".go-ipfs" &&
19
test -f ".go-ipfs/config" &&
20
test -d ".go-ipfs/datastore" ||
21
- fsh ls -al .go-ipfs
21
+ test_fsh ls -al .go-ipfs
22
'
23
24
test_expect_success "ipfs config succeeds" '
test/sharness/t0030-mount.sh
+1
-1
@@ -27,7 +27,7 @@ test_expect_failure "'ipfs mount' fails when no mount dir (issue #341)" '
27
test_expect_failure "'ipfs mount' looks good when it fails (issue #341)" '
28
! grep "IPFS mounted at: $(pwd)/ipfs" actual >/dev/null &&
29
! grep "IPNS mounted at: $(pwd)/ipns" actual >/dev/null ||
30
- fsh cat actual
30
+ test_fsh cat actual
31
'
32
33
# now mount properly, and keep going
test/sharness/t0040-add-and-cat.sh
+2
-2
@@ -16,7 +16,7 @@ test_expect_success "'ipfs add --help' succeeds" '
16
17
test_expect_success "'ipfs add --help' output looks good" '
18
egrep "ipfs add.*<path>" actual >/dev/null ||
19
- fsh cat actual
19
+ test_fsh cat actual
20
'
21
22
test_expect_success "'ipfs cat --help' succeeds" '
@@ -25,7 +25,7 @@ test_expect_success "'ipfs cat --help' succeeds" '
25
26
test_expect_success "'ipfs cat --help' output looks good" '
27
egrep "ipfs cat.*<ipfs-path>" actual >/dev/null ||
28
- fsh cat actual
28
+ test_fsh cat actual
29
'
30
31
test_expect_success "ipfs add succeeds" '
test/sharness/t0060-daemon.sh
+1
-1
@@ -48,7 +48,7 @@ test_expect_success ".go-ipfs/ has been created" '
48
test -d ".go-ipfs" &&
49
test -f ".go-ipfs/config" &&
50
test -d ".go-ipfs/datastore" ||
51
- fsh ls .go-ipfs
51
+ test_fsh ls .go-ipfs
52
'
53
54
test_expect_success "daemon is still running" '
test/sharness/t0090-get.sh
+1
-1
@@ -17,7 +17,7 @@ test_expect_success "'ipfs get --help' succeeds" '
17
18
test_expect_success "'ipfs get --help' output looks good" '
19
egrep "ipfs get.*<ipfs-path>" actual >/dev/null ||
20
- fsh cat actual
20
+ test_fsh cat actual
21
'
22
23
test_expect_success "ipfs get succeeds" '