Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
0ba4a6ff
Commit
0ba4a6ff
authored
Mar 31, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #998 from ipfs/kkoroviev-t0030-mount
t0030-mount.sh: 2 known breakages vanished (2)
parents
178a64d6
490c8859
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
test/sharness/lib/test-lib.sh
test/sharness/lib/test-lib.sh
+19
-0
test/sharness/t0030-mount.sh
test/sharness/t0030-mount.sh
+5
-6
No files found.
test/sharness/lib/test-lib.sh
View file @
0ba4a6ff
...
...
@@ -276,3 +276,22 @@ test_curl_resp_http_code() {
cat
curl_output
return
1
}
test_must_be_empty
()
{
if
test
-s
"
$1
"
then
echo
"'
$1
' is not empty, it contains:"
cat
"
$1
"
return
1
fi
}
test_should_contain
()
{
test
"$#"
=
2
||
error
"bug in the test script: not 2 parameters to test_should_contain"
if
!
grep
-q
"
$1
"
"
$2
"
then
echo
"'
$2
' does not contain '
$1
', it contains:"
cat
"
$2
"
return
1
fi
}
test/sharness/t0030-mount.sh
View file @
0ba4a6ff
...
...
@@ -20,14 +20,13 @@ test_launch_ipfs_daemon
# test mount failure before mounting properly.
test_expect_success
"'ipfs mount' fails when no mount dir"
'
test_must_fail ipfs mount -f=not_ipfs -n=not_ipns >
actual
test_expect_success
"'ipfs mount' fails when
there is
no mount dir"
'
test_must_fail ipfs mount -f=not_ipfs -n=not_ipns >
output 2>output.err
'
test_expect_success
"'ipfs mount' output looks good when it fails"
'
! grep "IPFS mounted at: $(pwd)/ipfs" actual >/dev/null &&
! grep "IPNS mounted at: $(pwd)/ipns" actual >/dev/null ||
test_fsh cat actual
test_expect_success
"'ipfs mount' output looks good"
'
test_must_be_empty output &&
test_should_contain "not_ipns\|not_ipfs" output.err
'
# now mount properly, and keep going
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment