mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 23:08:07 +08:00
add sharness tests
test for `ipfs name publish` using PeerID as key name License: MIT Signed-off-by: Kerem Gocen <keremgocen@gmail.com>
This commit is contained in:
parent
76e227d499
commit
fca98aea9d
@ -74,4 +74,20 @@ test_expect_failure "publish with our explicit node ID looks good" '
|
||||
test_cmp expected_node_id_publish actual_node_id_publish
|
||||
'
|
||||
|
||||
# publish with an explicit node ID as key name
|
||||
|
||||
test_expect_success "generate and verify a new key" '
|
||||
NEWID=`ipfs key gen --type=rsa --size=2048 keyname` &&
|
||||
test_check_peerid "${NEWID}"
|
||||
'
|
||||
|
||||
test_expect_success "'ipfs name publish --key=<peer-id> <hash>' succeeds" '
|
||||
ipfs name publish --key=${NEWID} "/ipfs/$HASH_WELCOME_DOCS" >actual_node_id_publish
|
||||
'
|
||||
|
||||
test_expect_success "publish an explicit node ID as key name looks good" '
|
||||
echo "Published to ${NEWID}: /ipfs/$HASH_WELCOME_DOCS" >expected_node_id_publish &&
|
||||
test_cmp expected_node_id_publish actual_node_id_publish
|
||||
'
|
||||
|
||||
test_done
|
||||
|
||||
Loading…
Reference in New Issue
Block a user