From ece2f0f0e3fd51f2aff2c45eab01bf1eb266d02d Mon Sep 17 00:00:00 2001 From: Christopher Moussa Date: Wed, 8 Jan 2025 14:43:28 -0800 Subject: [PATCH] t: add tests for max-resource dependencies Problem: The flux-accounting testsuite doesn't have any tests for checking dependencies on jobs when an association has hit their max resource limits. Add some basic tests. --- t/t1044-mf-priority-resource-limits.t | 167 +++++++++++++++++++++++++- 1 file changed, 165 insertions(+), 2 deletions(-) diff --git a/t/t1044-mf-priority-resource-limits.t b/t/t1044-mf-priority-resource-limits.t index 29ee970f..417ac7cd 100755 --- a/t/t1044-mf-priority-resource-limits.t +++ b/t/t1044-mf-priority-resource-limits.t @@ -43,8 +43,11 @@ test_expect_success 'add banks' ' flux account add-bank --parent-bank=root A 1 ' -test_expect_success 'add an association' ' - flux account add-user --username=user1 --userid=5001 --bank=A +test_expect_success 'add an association, configure max resource limits' ' + flux account add-user \ + --username=user1 --userid=5001 --bank=A \ + --max-active-jobs=1000 --max-running-jobs=3 \ + --max-nodes=2 --max-cores=4 ' test_expect_success 'send flux-accounting DB information to the plugin' ' @@ -91,4 +94,164 @@ test_expect_success 'cancel job; check resource counts' ' jq -e ".mf_priority_map[] | select(.userid == 5001) | .banks[0].cur_cores == 0" query.json && + test_debug "jq -S . query.json && + test_debug "jq -S . query.json && + test_debug "jq -S . query.json && + test_debug "jq -S . query.json && + test_debug "jq -S .