@cryptotaxi247 / kubo / commits / 43f4147d2

fix the urlstore tests

1. GC the intentionally broken files so we don't reuse their blocks. 2. Make sure we actually check the *new* output file instead of an old one. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>

Steven Allen committed Aug 22, 2018 at 17:14 UTC 43f4147d2510d9ed458daf2cd6c548e9b64617bb
1 file changed +7
test/sharness/t0272-urlstore.sh
+7
@@ -57,6 +57,7 @@ test_expect_success "make sure hashes are different" '
57 '
58
59 test_expect_success "get files via urlstore" '
60 + rm -f file1.actual file2.actual &&
61 ipfs get $HASH1 -o file1.actual &&
62 test_cmp file1 file1.actual &&
63 ipfs get $HASH2 -o file2.actual &&
@@ -111,6 +112,11 @@ test_expect_success "files can not be retrieved via the urlstore" '
112 test_must_fail ipfs cat $HASH2 > /dev/null
113 '
114
115 +test_expect_success "remove broken files" '
116 + ipfs pin rm $HASH1 $HASH2 &&
117 + ipfs repo gc > /dev/null
118 +'
119 +
120 test_expect_success "add large file using gateway address via url store" '
121 HASH3=$(ipfs urlstore add http://127.0.0.1:$GWAY_PORT/ipfs/$HASH3a)
122 '
@@ -120,6 +126,7 @@ test_expect_success "make sure hashes are different" '
126 '
127
128 test_expect_success "get large file via urlstore" '
129 + rm -f file3.actual &&
130 ipfs get $HASH3 -o file3.actual &&
131 test_cmp file3 file3.actual
132 '