mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 06:47:51 +08:00
test: handle id -> identity rename
"identity" is the official name
This commit is contained in:
parent
590ff37310
commit
403b322914
@ -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" '
|
||||
@ -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" '
|
||||
@ -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)" '
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user