From 8d7ad52e2f9028e30cf932bfbccd4cf01e3c149c Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Fri, 20 Dec 2024 10:29:19 -0800 Subject: [PATCH] t: cover improper kvs eventlogs Problem: The flux kvs eventlog commands don't have coverage for improperly formatted eventlogs. Add some coverage to t1008-kvs-eventlog.t. --- t/t1008-kvs-eventlog.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/t1008-kvs-eventlog.t b/t/t1008-kvs-eventlog.t index c19f5e229b9c..bb7ac4270b0a 100755 --- a/t/t1008-kvs-eventlog.t +++ b/t/t1008-kvs-eventlog.t @@ -224,6 +224,12 @@ test_expect_success 'flux kvs eventlog get fails on bad input' ' test_must_fail flux kvs eventlog get ' +test_expect_success 'flux kvs eventlog get fails on not an eventlog' ' + flux kvs put test.noteventlog=foo && + test_must_fail flux kvs eventlog get test.noteventlog 2> noteventlog1.err && + grep "cannot decode" noteventlog1.err +' + test_expect_success 'flux kvs eventlog append fails on bad input' ' test_must_fail flux kvs eventlog append ' @@ -236,6 +242,11 @@ test_expect_success 'flux kvs eventlog wait-event fails on bad input' ' test_must_fail flux kvs eventlog wait-event ' +test_expect_success 'flux kvs eventlog wait-event fails on not an eventlog' ' + test_must_fail flux kvs eventlog wait-event test.noteventlog foo 2> noteventlog2.err && + grep "cannot decode" noteventlog2.err +' + # # ensure no lingering pending requests #