Skip to content

Commit

Permalink
testsuite: add partial cancel tests for flux-ion
Browse files Browse the repository at this point in the history
Problem: flux ion-resource does not have testsuite tests.

Add them.
  • Loading branch information
milroy committed Jul 9, 2024
1 parent 541519b commit 51adff3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t4003-cancel-info.t
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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

0 comments on commit 51adff3

Please sign in to comment.