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-unixfs
Commits
cefb0140
Commit
cefb0140
authored
Nov 19, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #362 from chriscool/mount_bugs
Add sharness tests to document existing mount bugs
parents
b38f01ed
882aac22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
test/lib/test-lib.sh
test/lib/test-lib.sh
+14
-9
test/t0030-mount.sh
test/t0030-mount.sh
+17
-0
No files found.
test/lib/test-lib.sh
View file @
cefb0140
...
@@ -51,6 +51,19 @@ test_wait_output_n_lines_60_sec() {
...
@@ -51,6 +51,19 @@ test_wait_output_n_lines_60_sec() {
test_cmp
"expected_waitn"
"actual_waitn"
test_cmp
"expected_waitn"
"actual_waitn"
}
}
test_launch_ipfs_daemon
()
{
test_expect_success FUSE
"'ipfs daemon' succeeds"
'
ipfs daemon >actual &
'
test_expect_success FUSE
"'ipfs daemon' output looks good"
'
IPFS_PID=$! &&
echo "daemon listening on /ip4/127.0.0.1/tcp/5001" >expected &&
test_cmp_repeat_10_sec expected actual
'
}
test_launch_ipfs_mount
()
{
test_launch_ipfs_mount
()
{
test_expect_success
"ipfs init succeeds"
'
test_expect_success
"ipfs init succeeds"
'
...
@@ -64,15 +77,7 @@ test_launch_ipfs_mount() {
...
@@ -64,15 +77,7 @@ test_launch_ipfs_mount() {
ipfs config Mounts.IPNS "$(pwd)/ipns"
ipfs config Mounts.IPNS "$(pwd)/ipns"
'
'
test_expect_success FUSE
"'ipfs daemon' succeeds"
'
test_launch_ipfs_daemon
ipfs daemon >actual &
'
test_expect_success FUSE
"'ipfs daemon' output looks good"
'
IPFS_PID=$! &&
echo "daemon listening on /ip4/127.0.0.1/tcp/5001" >expected &&
test_cmp_repeat_10_sec expected actual
'
test_expect_success FUSE
"'ipfs mount' succeeds"
'
test_expect_success FUSE
"'ipfs mount' succeeds"
'
ipfs mount >actual
ipfs mount >actual
...
...
test/t0030-mount.sh
View file @
cefb0140
...
@@ -19,4 +19,21 @@ test_launch_ipfs_mount
...
@@ -19,4 +19,21 @@ test_launch_ipfs_mount
test_kill_ipfs_mount
test_kill_ipfs_mount
test_expect_success
"mount directories can be removed"
'
rmdir ipfs ipns
'
test_launch_ipfs_daemon
test_expect_failure
"'ipfs mount' fails when no mount dir (issue #341)"
'
test_must_fail ipfs mount >actual
'
test_expect_failure
"'ipfs mount' looks good when it fails (issue #341)"
'
! grep "IPFS mounted at" actual &&
! grep "IPNS mounted at" actual
'
test_kill_ipfs_mount
test_done
test_done
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