mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-23 21:47:52 +08:00
More test fixes.
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
This commit is contained in:
@ -43,8 +43,8 @@ test_expect_success "add files using gateway address via url store" '
|
||||
'
|
||||
|
||||
test_expect_success "make sure hashes are different" '
|
||||
echo $HASH1a $HASH1 ## FIXME
|
||||
echo $HASH2a $HASH2 ## FIXME
|
||||
test $HASH1a != $HASH1 &&
|
||||
test $HASH2a != $HASH2
|
||||
'
|
||||
|
||||
test_expect_success "get files via urlstore" '
|
||||
@ -97,15 +97,19 @@ test_expect_success "ipfs filestore verify is correct" '
|
||||
test_cmp verify_expect_2 verify_actual_2
|
||||
'
|
||||
|
||||
test_expect_failure "files can not be retrieved via the urlstore" '
|
||||
test_must_fail ipfs get $HASH1 &&
|
||||
test_must_fail ipfs get $HASH2
|
||||
test_expect_success "files can not be retrieved via the urlstore" '
|
||||
test_must_fail ipfs cat $HASH1 > /dev/null &&
|
||||
test_must_fail ipfs cat $HASH2 > /dev/null
|
||||
'
|
||||
|
||||
test_expect_success "add large file using gateway address via url store" '
|
||||
HASH3=$(ipfs urlstore add http://127.0.0.1:$GWAY_PORT/ipfs/$HASH3a)
|
||||
'
|
||||
|
||||
test_expect_success "make sure hashes are different" '
|
||||
test $HASH3a != $HASH3
|
||||
'
|
||||
|
||||
test_expect_success "get large file via urlstore" '
|
||||
ipfs get $HASH3 -o file3.actual &&
|
||||
test_cmp file3 file3.actual
|
||||
@ -114,9 +118,9 @@ test_expect_success "get large file via urlstore" '
|
||||
test_kill_ipfs_daemon
|
||||
|
||||
test_expect_success "files can not be retrieved via the urlstore" '
|
||||
test_must_fail ipfs get $HASH1 &&
|
||||
test_must_fail ipfs get $HASH2 &&
|
||||
test_must_fail ipfs get $HASH3
|
||||
test_must_fail ipfs cat $HASH1 > /dev/null &&
|
||||
test_must_fail ipfs cat $HASH2 > /dev/null &&
|
||||
test_must_fail ipfs cat $HASH3 > /dev/null
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user