diff --git a/test/sharness/t0165-keystore.sh b/test/sharness/t0165-keystore.sh index 0bd8f74e6..4a4378692 100755 --- a/test/sharness/t0165-keystore.sh +++ b/test/sharness/t0165-keystore.sh @@ -175,6 +175,7 @@ ipfs key rm key_ed25519 test_cmp rsa_key_id roundtrip_rsa_key_id ' + # export works directly on the keystore present in IPFS_PATH test_expect_success "export and import ed25519 key while daemon is running" ' edhash=$(ipfs key gen exported_ed25519_key --type=ed25519) echo $edhash > ed25519_key_id @@ -184,10 +185,15 @@ ipfs key rm key_ed25519 test_cmp ed25519_key_id roundtrip_ed25519_key_id ' + test_expect_success "key export over HTTP /api/v0/key/export is not possible" ' + ipfs key gen nohttpexporttest_key --type=ed25519 && + test_curl_resp_http_code "http://127.0.0.1:$API_PORT/api/v0/key/export&arg=nohttpexporttest_key" "HTTP/1.1 404 Not Found" + ' + test_expect_success "online rotate rsa key" ' test_must_fail ipfs key rotate ' - + test_kill_ipfs_daemon }