Skip to content

Commit

Permalink
testsuite: cover content-sqlite metadata access
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Mar 2, 2020
1 parent 31258b3 commit 40409f1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions t/t0012-content-sqlite.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,38 @@ test_expect_success 'load content-sqlite module on rank 0' '
flux module load content-sqlite
'

test_expect_success 'store metadata key-val pairs' '
flux content metaput foo bar &&
flux content metaput foo2 42 &&
flux content metaput foo3 "x x x"
'

test_expect_success 'metadata values are correct' '
VAL=$(flux content metaget foo) &&
test "$VAL" = "bar" &&
VAL=$(flux content metaget foo2) &&
test "$VAL" = "42" &&
VAL=$(flux content metaget foo3) &&
test "$VAL" = "x x x"
'

test_expect_success 'get unknown metadata fails' '
test_must_fail flux content metaget noexist
'

test_expect_success 'put metata on existing value is allowed' '
flux content metaput foo zzz
'

test_expect_success 'metadata value was updated' '
VAL=$(flux content metaget foo) &&
test "$VAL" = "zzz"
'

test_expect_success 'empty metadata key is not allowed' '
test_must_fail flux content metaput "" xyz
'

test_expect_success 'store 100 blobs on rank 0' '
store_junk test 100 &&
TOTAL=`flux module stats --type int --parse count content` &&
Expand Down

0 comments on commit 40409f1

Please sign in to comment.