Fixup all original test issues
Peter Rabbitson committed
Apr 10, 2020 at 14:45 UTC
4319c12692064f4cc97e5b59c1e05d0f721d7a69
1 file changed
+8
-8
test/sharness/t0054-dag-car-import-export.sh
+8
-8
@@ -12,14 +12,15 @@ tar -C ../t0054-dag-car-import-export-data/ --strip-components=1 -Jxf ../t0054-d
12
13
reset_blockstore() {
14
node=$1
15
- ipfsi $1 pin ls --quiet --type=recursive | ipfsi $1 pin rm &>/dev/null
16
- ipfsi $1 repo gc &>/dev/null
15
+
16
+ ipfsi $node pin ls --quiet --type=recursive | ipfsi $node pin rm &>/dev/null
17
+ ipfsi $node repo gc &>/dev/null
18
19
test_expect_success "pinlist empty" '
19
- [ "$( ipfsi $1 pin ls )" = "" ]
20
+ [[ -z "$( ipfsi $node pin ls )" ]]
21
'
22
test_expect_success "nothing left to gc" '
22
- [ "$( ipfsi $1 repo gc )" = "" ]
23
+ [[ -z "$( ipfsi $node repo gc )" ]]
24
'
25
}
26
@@ -57,7 +58,7 @@ run_online_imp_exp_tests() {
58
59
# FIXME - positive-test the lack of output when https://github.com/ipfs/go-ipfs/issues/7121 is addressed
60
test_expect_failure "concurrent GC did not manage to grab anything and remained silent" '
60
- ! [[ -s gc_out ]]
61
+ test_cmp /dev/null gc_out
62
'
63
test_expect_success "basic import output as expected" '
64
test_cmp basic_import_expected basic_import_actual
@@ -91,7 +92,7 @@ run_online_imp_exp_tests() {
92
'
93
# FIXME - positive-test the lack of output when https://github.com/ipfs/go-ipfs/issues/7121 is addressed
94
test_expect_failure "concurrent GC did not manage to grab anything and remained silent" '
94
- ! [[ -s gc_out ]]
95
+ test_cmp /dev/null gc_out
96
'
97
98
test_expect_success "fifo-import output as expected" '
@@ -154,7 +155,7 @@ test_expect_success "pin-less import works" '
155
> no-pin_import_actual
156
'
157
test_expect_success "expected silence on --pin-roots=false" '
157
- ! [[ -s no-pin_import_actual ]]
158
+ test_cmp /dev/null no-pin_import_actual
159
'
160
161
@@ -170,5 +171,4 @@ test_expect_success "naked root import expected output" '
171
test_cmp naked_root_import_expected naked_root_import_actual
172
'
173
173
-
174
test_done