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
c0a04a06
Commit
c0a04a06
authored
May 04, 2017
by
Michael Muré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sharness test for ipfs key rename
License: MIT Signed-off-by:
Michael Muré
<
batolettre@gmail.com
>
parent
3aa6d78e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
test/sharness/t0165-keystore.sh
test/sharness/t0165-keystore.sh
+18
-0
No files found.
test/sharness/t0165-keystore.sh
View file @
c0a04a06
...
...
@@ -44,6 +44,24 @@ test_key_cmd() {
ipfs key list | sort > list_out &&
test_cmp list_exp list_out
'
test_expect_success
"key rename rename a key"
'
ipfs key rename bazed fooed
echo fooed > list_exp &&
echo self >> list_exp
ipfs key list | sort > list_out &&
test_cmp list_exp list_out
'
test_expect_success
"key rename can't remove self"
'
test_must_fail ipfs key rename self bar 2>&1 | tee key_rename_out &&
grep -q "Error: cannot rename key with name" key_rename_out
'
test_expect_success
"key rename can't overwrite self, even with force"
'
test_must_fail ipfs key rename -f fooed self 2>&1 | tee key_rename_out &&
grep -q "Error: cannot overwrite key with name" key_rename_out
'
}
test_key_cmd
...
...
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