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
667a9c89
Commit
667a9c89
authored
Jul 05, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test for sharness locking
License: MIT Signed-off-by:
Steven Allen
<
steven@stebalien.com
>
parent
b6081be3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
test/sharness/t0063-external.sh
test/sharness/t0063-external.sh
+16
-5
No files found.
test/sharness/t0063-external.sh
View file @
667a9c89
...
...
@@ -14,17 +14,28 @@ PATH=`pwd`/bin:$PATH
test_init_ipfs
test_launch_ipfs_daemon
test_expect_success
"create fake ipfs-update bin"
'
mkdir bin &&
echo "#!/bin/sh" > bin/ipfs-update &&
echo "pwd" >> bin/ipfs-update &&
chmod +x bin/ipfs-update
echo "test -e \"$IPFS_PATH/repo.lock\" || echo \"repo not locked\" " >> bin/ipfs-update &&
chmod +x bin/ipfs-update &&
mkdir just_for_test
'
test_expect_success
"external command runs from current user directory and doesn't lock repo"
'
(cd just_for_test && ipfs update) > actual
'
test_expect_success
"output looks good"
'
echo `pwd`/just_for_test > exp &&
echo "repo not locked" >> exp &&
test_cmp exp actual
'
test_expect_success
"external command runs from current user directory"
'
mkdir just_for_test &&
test_launch_ipfs_daemon
test_expect_success
"external command runs from current user directory when daemon is running"
'
(cd just_for_test && ipfs update) > actual
'
...
...
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