diff --git a/t/kvs/kvs-helper.sh b/t/kvs/kvs-helper.sh index 6f86a4d36287..128e404dd13a 100755 --- a/t/kvs/kvs-helper.sh +++ b/t/kvs/kvs-helper.sh @@ -21,6 +21,14 @@ loophandlereturn() { return 0 } +# arg1 - key to retrieve +# arg2 - expected value +test_kvs_key() { + flux kvs get --json "$1" >output + echo "$2" >expected + test_cmp expected output +} + # arg1 - key to retrieve # arg2 - value to wait for wait_watch_put() { diff --git a/t/t1000-kvs.t b/t/t1000-kvs.t index cb80707ea7ac..f91880954f98 100755 --- a/t/t1000-kvs.t +++ b/t/t1000-kvs.t @@ -7,6 +7,8 @@ These are the basic/core flux kvs tests and should be run before any other tests that require kvs functionality. ' +. `dirname $0`/kvs/kvs-helper.sh + . `dirname $0`/sharness.sh if test "$TEST_LONG" = "t"; then @@ -23,12 +25,6 @@ KEY=test.a.b.c SUBDIR1=test.a.b.d SUBDIR2=test.a.b.e -test_kvs_key() { - flux kvs get --json "$1" >output - echo "$2" >expected - test_cmp expected output -} - # # Basic put, get, unlink tests # diff --git a/t/t1004-kvs-namespace.t b/t/t1004-kvs-namespace.t index 1805399d4c9d..6f279f8138aa 100755 --- a/t/t1004-kvs-namespace.t +++ b/t/t1004-kvs-namespace.t @@ -29,12 +29,6 @@ NAMESPACETEST=namespacetest NAMESPACETMP=namespacetmp NAMESPACERANK1=namespacerank1 -test_kvs_key() { - flux kvs get --json "$1" >output - echo "$2" >expected - test_cmp expected output -} - test_kvs_key_namespace() { export FLUX_KVS_NAMESPACE=$1 flux kvs get --json "$2" >output