test: add rotate self test
Jacob Heun committed
Aug 21, 2020 at 20:08 UTC
edfd3c9743631f6d43937ab09c445505300fd338
1 file changed
+6
test/sharness/t0027-rotate.sh
+6
@@ -46,6 +46,12 @@ test_rotate() {
46
esac
47
'
48
49
+ test_expect_success "'ipfs key rotate -o self' should fail" '
50
+ echo "Error: keystore name for back up cannot be named '\''self'\''" >expected-self
51
+ test_must_fail ipfs key rotate -o self 2>actual-self &&
52
+ test_cmp expected-self actual-self
53
+ '
54
+
55
test_expect_success "Compare second ID and key to first" '
56
ipfs id -f="<id>" > second_id &&
57
ipfs id -f="<pubkey>" > second_key &&