@cryptotaxi247 / kubo / commits / cb8d5eb24

Add a test for failure of 'ipfs key rm self'

License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>

Michael Muré committed May 14, 2017 at 21:01 UTC cb8d5eb2458f5aa122c22e5038b8ad333b796145
1 file changed +6 -1
test/sharness/t0165-keystore.sh
+6 -1
@@ -45,6 +45,11 @@ test_key_cmd() {
45 test_cmp list_exp list_out
46 '
47
48 + test_expect_success "key rm can't remove self" '
49 + test_must_fail ipfs key rm self 2>&1 | tee key_rm_out &&
50 + grep -q "Error: cannot remove key with name" key_rm_out
51 + '
52 +
53 test_expect_success "key rename rename a key" '
54 ipfs key rename bazed fooed
55 echo fooed > list_exp &&
@@ -53,7 +58,7 @@ test_key_cmd() {
58 test_cmp list_exp list_out
59 '
60
56 - test_expect_success "key rename can't remove self" '
61 + test_expect_success "key rename can't rename self" '
62 test_must_fail ipfs key rename self bar 2>&1 | tee key_rename_out &&
63 grep -q "Error: cannot rename key with name" key_rename_out
64 '