@cryptotaxi247 / kubo / commits / 72b20017c

t0060: add tests for version and help commands

As `ipfs version` and `ipfs help` are basic commands it is ok to test them online in t0060. License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed Mar 29, 2015 at 19:14 UTC 72b20017ca8292106f42b9f827e9a7e648203a7a
1 file changed +23
test/sharness/t0060-daemon.sh
+23
@@ -61,6 +61,29 @@ test_expect_success ".go-ipfs/ has been created" '
61 test_fsh ls .go-ipfs
62 '
63
64 +# begin same as in t0010
65 +
66 +test_expect_success "ipfs version succeeds" '
67 + ipfs version >version.txt
68 +'
69 +
70 +test_expect_success "ipfs version output looks good" '
71 + cat version.txt | egrep "^ipfs version [0-9]+\.[0-9]+\.[0-9]" >/dev/null ||
72 + test_fsh cat version.txt
73 +'
74 +
75 +test_expect_success "ipfs help succeeds" '
76 + ipfs help >help.txt
77 +'
78 +
79 +test_expect_success "ipfs help output looks good" '
80 + cat help.txt | egrep -i "^Usage:" >/dev/null &&
81 + cat help.txt | egrep "ipfs .* <command>" >/dev/null ||
82 + test_fsh cat help.txt
83 +'
84 +
85 +# end same as in t0010
86 +
87 test_expect_success "daemon is still running" '
88 kill -0 $IPFS_PID
89 '