Skip to content

Commit

Permalink
t/kvs: Add valref with invalid blobref test
Browse files Browse the repository at this point in the history
  • Loading branch information
chu11 committed Oct 17, 2017
1 parent 9f03dda commit 116f6b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/t1002-kvs-extra.t
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,14 @@ test_expect_success 'kvs: valref that points to zero size content store data can
test $(${KVSBASIC} copy-fromkvs $TEST.empty -|wc -c) -eq 0
'

test_expect_success 'kvs: valref that doesnt point to raw data fails' '
flux kvs unlink -Rf $TEST &&
flux kvs mkdir $TEST.a.b.c &&
dirhash=`${KVSBASIC} get-treeobj $TEST.a.b.c | grep -P "sha1-[A-Za-z0-9]+" -o` &&
${KVSBASIC} put-treeobj $TEST.value="{\"data\":[\"${dirhash}\"],\"type\":\"valref\",\"ver\":1}" &&
test_must_fail ${KVSBASIC} copy-fromkvs $TEST.value -
'

# dtree tests

test_expect_success 'kvs: store 16x3 directory tree' '
Expand Down

0 comments on commit 116f6b8

Please sign in to comment.