More test fixes.
License: MIT Signed-off-by: Kevin Atkinson <k@kevina.org>
Kevin Atkinson committed
Jun 26, 2018 at 19:15 UTC
0c2efb90d3896194ee18f28449503963972209cf
1 file changed
+12
-8
test/sharness/t0272-urlstore.sh
+12
-8
@@ -43,8 +43,8 @@ test_expect_success "add files using gateway address via url store" '
43
'
44
45
test_expect_success "make sure hashes are different" '
46
- echo $HASH1a $HASH1 ## FIXME
47
- echo $HASH2a $HASH2 ## FIXME
46
+ test $HASH1a != $HASH1 &&
47
+ test $HASH2a != $HASH2
48
'
49
50
test_expect_success "get files via urlstore" '
@@ -97,15 +97,19 @@ test_expect_success "ipfs filestore verify is correct" '
97
test_cmp verify_expect_2 verify_actual_2
98
'
99
100
-test_expect_failure "files can not be retrieved via the urlstore" '
101
- test_must_fail ipfs get $HASH1 &&
102
- test_must_fail ipfs get $HASH2
100
+test_expect_success "files can not be retrieved via the urlstore" '
101
+ test_must_fail ipfs cat $HASH1 > /dev/null &&
102
+ test_must_fail ipfs cat $HASH2 > /dev/null
103
'
104
105
test_expect_success "add large file using gateway address via url store" '
106
HASH3=$(ipfs urlstore add http://127.0.0.1:$GWAY_PORT/ipfs/$HASH3a)
107
'
108
109
+test_expect_success "make sure hashes are different" '
110
+ test $HASH3a != $HASH3
111
+'
112
+
113
test_expect_success "get large file via urlstore" '
114
ipfs get $HASH3 -o file3.actual &&
115
test_cmp file3 file3.actual
@@ -114,9 +118,9 @@ test_expect_success "get large file via urlstore" '
118
test_kill_ipfs_daemon
119
120
test_expect_success "files can not be retrieved via the urlstore" '
117
- test_must_fail ipfs get $HASH1 &&
118
- test_must_fail ipfs get $HASH2 &&
119
- test_must_fail ipfs get $HASH3
121
+ test_must_fail ipfs cat $HASH1 > /dev/null &&
122
+ test_must_fail ipfs cat $HASH2 > /dev/null &&
123
+ test_must_fail ipfs cat $HASH3 > /dev/null
124
'
125
126
test_done