Skip to content

Commit

Permalink
test: handle id -> identity rename
Browse files Browse the repository at this point in the history
"identity" is the official name
  • Loading branch information
Stebalien committed Aug 23, 2019
1 parent 2d09c3a commit 04d4f2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions test/sharness/t0046-id-hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ test_init_ipfs
ID_HASH0=bafkqaedknncdsodknncdsnzvnbvuioak
ID_HASH0_CONTENTS=jkD98jkD975hkD8

test_expect_success "can fetch random id hash" '
test_expect_success "can fetch random identity hash" '
ipfs cat $ID_HASH0 > expected &&
echo $ID_HASH0_CONTENTS > actual &&
test_cmp expected actual
'

test_expect_success "can pin random id hash" '
test_expect_success "can pin random identity hash" '
ipfs pin add $ID_HASH0
'

test_expect_success "ipfs add succeeds with id hash" '
test_expect_success "ipfs add succeeds with identity hash" '
echo "djkd7jdkd7jkHHG" > junk.txt &&
HASH=$(ipfs add -q --hash=id junk.txt)
HASH=$(ipfs add -q --hash=identity junk.txt)
'

test_expect_success "content not actually added" '
Expand All @@ -48,10 +48,10 @@ test_expect_success "ipfs add --inline works as expected" '
HASH=$(ipfs add -q --inline afile)
'

test_expect_success "ipfs add --inline uses id multihash" '
test_expect_success "ipfs add --inline uses identity multihash" '
MHTYPE=`cid-fmt %h $HASH`
echo "mhtype is $MHTYPE"
test "$MHTYPE" = id
test "$MHTYPE" = identity
'

test_expect_success "ipfs add --inline --raw-leaves works as expected" '
Expand Down Expand Up @@ -82,19 +82,19 @@ test_expect_success "enable filestore" '
ipfs config --json Experimental.FilestoreEnabled true
'

test_expect_success "can fetch random id hash (filestore enabled)" '
test_expect_success "can fetch random identity hash (filestore enabled)" '
ipfs cat $ID_HASH0 > expected &&
echo $ID_HASH0_CONTENTS > actual &&
test_cmp expected actual
'

test_expect_success "can pin random id hash (filestore enabled)" '
test_expect_success "can pin random identity hash (filestore enabled)" '
ipfs pin add $ID_HASH0
'

test_expect_success "ipfs add succeeds with id hash and --nocopy" '
test_expect_success "ipfs add succeeds with identity hash and --nocopy" '
echo "djkd7jdkd7jkHHG" > junk.txt &&
HASH=$(ipfs add -q --hash=id --nocopy junk.txt)
HASH=$(ipfs add -q --hash=identity --nocopy junk.txt)
'

test_expect_success "content not actually added (filestore enabled)" '
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0290-cid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ cat <<EOF > codecs_expect
EOF

cat <<EOF > hashes_expect
0 id
0 identity
17 sha1
18 sha2-256
19 sha2-512
Expand Down

0 comments on commit 04d4f2e

Please sign in to comment.