Skip to content

Commit 285b370

Browse files
committed
t: cover valref with multiple bad blobrefs
Problem: There are no flux-fsck tests to cover valrefs that have multiple invalid blobrefs. Update a test in t2816-fsck-cmd.t to cover this case.
1 parent 8a24a10 commit 285b370

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

t/t2816-fsck-cmd.t

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ test_expect_success 'load kvs' '
8484
flux module load kvs
8585
'
8686
test_expect_success 'make a reference invalid' '
87-
cat dirc.out | jq -c .data[2]=\"sha1-1234567890123456789012345678901234567890\" > dircbad.out &&
88-
flux kvs put --treeobj dir.c="$(cat dircbad.out)"
87+
cat dirc.out | jq -c .data[1]=\"sha1-1234567890123456789012345678901234567890\" > dircbad1.out &&
88+
cat dircbad1.out | jq -c .data[2]=\"sha1-1234567890123456789012345678901234567890\" > dircbad2.out &&
89+
flux kvs put --treeobj dir.c="$(cat dircbad2.out)"
8990
'
9091
test_expect_success 'unload kvs' '
9192
flux module remove kvs
@@ -102,6 +103,7 @@ test_expect_success 'flux-fsck detects errors' '
102103
test_expect_success 'flux-fsck --verbose outputs details' '
103104
test_must_fail flux fsck --verbose 2> fsckerrors3V.out &&
104105
grep "dir\.b" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
106+
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=1" &&
105107
grep "dir\.c" fsckerrors3V.out | grep "missing blobref" | grep "index=2" &&
106108
grep "Total errors: 2" fsckerrors3V.out
107109
'

0 commit comments

Comments
 (0)