Skip to content

Commit

Permalink
fix sharness flags
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Jul 13, 2020
1 parent fdf2325 commit e38741a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test/sharness/lib/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ file_size() {

test_check_peerid() {
peeridlen=$(echo "$1" | tr -dC "[:alnum:]" | wc -c | tr -d " ") &&
test "$peeridlen" = "46" -o "$peeridlen" = "52" || {
test "$peeridlen" = "46" -o "$peeridlen" = "52" -o "$peeridlen" = "62" || {
echo "Bad peerid '$1' with len '$peeridlen'"
return 1
}
Expand Down
9 changes: 4 additions & 5 deletions test/sharness/t0114-gateway-subdomains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ test_expect_success "Add the test directory" '
'

test_expect_success "Publish test text file to IPNS using RSA keys" '
PEERID=$(ipfs key gen --type=rsa --size=2048 test_key_rsa | head -n1 | tr -d "\n")
PEERID=$(ipfs key gen -f=b58mh --type=rsa --size=2048 test_key_rsa | head -n1 | tr -d "\n")
IPNS_IDv0=$(echo "$PEERID" | ipfs cid format -v 0)
IPNS_IDv1=$(echo "$PEERID" | ipfs cid format -v 1 --codec libp2p-key -b base36)
IPNS_IDv1_DAGPB=$(echo "$IPNS_IDv0" | ipfs cid format -v 1 -b base36)
Expand All @@ -121,10 +121,9 @@ test_expect_success "Publish test text file to IPNS using RSA keys" '
'

test_expect_success "Publish test text file to IPNS using ED25519 keys" '
# PEERID is base58 multi-hash, not CIDv1, breaks "ipfs cid"
PEERID=$(ipfs key gen --type=ed25519 test_key_ed25519 | head -n1 | tr -d "\n") &&
# IPNS_IDv0=???
# IPNS_IDv1=???
PEERID=$(ipfs key gen -f=b36cid --type=ed25519 test_key_ed25519 | head -n1 | tr -d "\n") &&
IPNS_IDv0=$PEERID
IPNS_IDv1=$PEERID
test_check_peerid "${PEERID}" &&
ipfs name publish --key test_key_ed25519 --allow-offline -Q "/ipfs/$CIDv1" > name_publish_out &&
ipfs name resolve "$PEERID" > output &&
Expand Down

0 comments on commit e38741a

Please sign in to comment.