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
872daf83
Commit
872daf83
authored
Aug 25, 2015
by
Christian Couder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
t0020: add test for --empty-repo
License: MIT Signed-off-by:
Christian Couder
<
chriscool@tuxfamily.org
>
parent
73e820a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
test/sharness/t0020-init.sh
test/sharness/t0020-init.sh
+31
-0
No files found.
test/sharness/t0020-init.sh
View file @
872daf83
...
...
@@ -75,6 +75,37 @@ test_expect_success "ipfs init output looks good" '
test_cmp expected actual_init
'
test_expect_success
"Welcome readme exists"
'
ipfs cat /ipfs/$HASH_WELCOME_DOCS/readme
'
test_expect_success
"clean up ipfs dir"
'
rm -rf "$IPFS_PATH"
'
test_expect_success
"'ipfs init --empty-repo' succeeds"
'
BITS="1024" &&
ipfs init --bits="$BITS" --empty-repo >actual_init
'
test_expect_success
"ipfs peer id looks good"
'
PEERID=$(ipfs config Identity.PeerID) &&
echo $PEERID | tr -dC "[:alnum:]" | wc -c | tr -d " " >actual_peerid &&
echo "46" >expected_peerid &&
test_cmp expected_peerid actual_peerid
'
test_expect_success
"'ipfs init --empty-repo' output looks good"
'
echo "initializing ipfs node at $IPFS_PATH" >expected &&
echo "generating $BITS-bit RSA keypair...done" >>expected &&
echo "peer identity: $PEERID" >>expected &&
test_cmp expected actual_init
'
test_expect_success
"Welcome readme doesn't exists"
'
test_must_fail ipfs cat /ipfs/$HASH_WELCOME_DOCS/readme
'
test_expect_success
"clean up ipfs dir"
'
rm -rf "$IPFS_PATH"
'
...
...
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