From 51adff357cf04f3c1dd923c7f3f84114207b209e Mon Sep 17 00:00:00 2001 From: Daniel Milroy Date: Wed, 3 Jul 2024 19:49:49 -0700 Subject: [PATCH] testsuite: add partial cancel tests for flux-ion Problem: flux ion-resource does not have testsuite tests. Add them. --- t/t4003-cancel-info.t | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/t/t4003-cancel-info.t b/t/t4003-cancel-info.t index ae7a384f7..f287c7bcc 100755 --- a/t/t4003-cancel-info.t +++ b/t/t4003-cancel-info.t @@ -9,7 +9,11 @@ Ensure that the cancel and info handlers within the resource module works . `dirname $0`/sharness.sh grug="${SHARNESS_TEST_SRCDIR}/data/resource/grugs/tiny.graphml" +rv1="${SHARNESS_TEST_SRCDIR}/data/resource/rv1exec/tiny_rv1exec.json" jobspec="${SHARNESS_TEST_SRCDIR}/data/resource/jobspecs/basics/test001.yaml" +jobspec1="${SHARNESS_TEST_SRCDIR}/data/resource/jobspecs/cancel/test018.yaml" +jobspec2="${SHARNESS_TEST_SRCDIR}/data/resource/jobspecs/cancel/test019.yaml" +rv1cancel="${SHARNESS_TEST_SRCDIR}/data/resource/rv1exec/cancel/rank1_cancel.json" # # test_under_flux is under sharness.d/ @@ -71,4 +75,20 @@ test_expect_success 'removing resource works' ' remove_resource ' +test_expect_success 'loading resource module with a tiny machine config works' ' + load_resource \ +load-file=${rv1} prune-filters=ALL:core \ +load-format=rv1exec subsystems=containment policy=low +' + +test_expect_success 'resource-cancel works' ' + flux ion-resource match allocate ${jobspec1} && + flux ion-resource partial-cancel 0 ${rv1cancel} && + flux ion-resource match allocate ${jobspec2} +' + +test_expect_success 'removing resource works' ' + remove_resource +' + test_done