Skip to content

Commit

Permalink
t/kvs: Add more tests to t1002-kvs-extra
Browse files Browse the repository at this point in the history
Add additional bad treeobj test cases.
  • Loading branch information
chu11 committed Aug 18, 2017
1 parent 2282f46 commit 3ba6fc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t/t1002-kvs-extra.t
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ test_expect_success 'kvs: put-treeobj: fails bad dirent: bad link data' '

test_expect_success 'kvs: put-treeobj: fails bad dirent: bad ref data' '
flux kvs unlink -Rf $TEST &&
test_must_fail ${KVSBASIC} put-treeobj $TEST.a="{\"data\":42,\"type\":\"dirref\",\"ver\":1}"
test_must_fail ${KVSBASIC} put-treeobj $TEST.a="{\"data\":42,\"type\":\"dirref\",\"ver\":1}" &&
test_must_fail ${KVSBASIC} put-treeobj $TEST.a="{\"data\":"sha1-4087718d190b373fb490b27873f61552d7f29dbe",\"type\":\"dirref\",\"ver\":1}"
'

test_expect_success 'kvs: put-treeobj: fails bad dirent: bad blobref' '
Expand All @@ -237,6 +238,7 @@ test_expect_success 'kvs: getat: fails bad on dirent' '
test_must_fail ${KVSBASIC} getat "{\"data\":[\"sha1-aaa\"],\"type\":\"dirref\",\"ver\":1}" $TEST.a &&
test_must_fail ${KVSBASIC} getat "{\"data\":[\"sha1-bbb\"],\"type\":\"dirref\",\"ver\":1}" $TEST.a &&
test_must_fail ${KVSBASIC} getat "{\"data\":42,\"type\":\"dirref\",\"ver\":1}" $TEST.a
test_must_fail ${KVSBASIC} getat "{\"data\":"sha1-4087718d190b373fb490b27873f61552d7f29dbe",\"type\":\"dirref\",\"ver\":1}" $TEST.a
'

test_expect_success 'kvs: getat: works on root from get-treeobj' '
Expand Down

0 comments on commit 3ba6fc1

Please sign in to comment.