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
220e108d
Commit
220e108d
authored
Nov 16, 2014
by
Christian Couder
Committed by
Juan Batiz-Benet
Nov 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt mount tests to ipfs2 changes
License: MIT Signed-off-by:
Christian Couder
<
chriscool@tuxfamily.org
>
parent
b140c338
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
10 deletions
+27
-10
test/lib/test-lib.sh
test/lib/test-lib.sh
+27
-10
No files found.
test/lib/test-lib.sh
View file @
220e108d
...
...
@@ -52,27 +52,44 @@ test_launch_ipfs_mount() {
ipfs config Mounts.IPNS "$(pwd)/ipns"
'
test_expect_success FUSE
"ipfs
mount
succeeds"
'
ipfs
mount mountdir
>actual &
test_expect_success FUSE
"
'
ipfs
daemon'
succeeds"
'
ipfs
daemon
>actual &
'
test_expect_success FUSE
"ipfs
mount
output looks good"
'
test_expect_success FUSE
"
'
ipfs
daemon'
output looks good"
'
IPFS_PID=$! &&
echo "mounting ipfs at $(pwd)/ipfs" >expected &&
echo "mounting ipns at $(pwd)/ipns" >>expected &&
echo "API server listening on '
\'
'127.0.0.1:5001'
\'
'" >expected &&
test_cmp_repeat_10_sec expected actual
'
test_expect_success FUSE
"'ipfs mount' succeeds"
'
ipfs mount >actual
'
test_expect_success FUSE
"'ipfs mount' output looks good"
'
echo "IPFS mounted at: $(pwd)/ipfs" >expected &&
echo "IPNS mounted at: $(pwd)/ipns" >>expected &&
test_cmp expected actual
'
}
test_kill_repeat_10_sec
()
{
for
i
in
1 2 3 4 5 6 7 8 9 10
do
kill
$1
sleep
1
!
kill
-0
$1
2>/dev/null
&&
return
done
!
kill
-0
$1
2>/dev/null
}
test_kill_ipfs_mount
()
{
test_expect_success FUSE
"ipfs
mount
is still running"
'
test_expect_success FUSE
"
'
ipfs
daemon'
is still running"
'
kill -0 $IPFS_PID
'
test_expect_success FUSE
"ipfs mount can be killed"
'
kill $IPFS_PID &&
sleep 1 &&
! kill -0 $IPFS_PID 2>/dev/null
test_expect_success FUSE
"'ipfs daemon' can be killed"
'
test_kill_repeat_10_sec $IPFS_PID
'
}
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