Skip to content

Commit

Permalink
testsuite: add tests for writing agfilter status
Browse files Browse the repository at this point in the history
Problem: the testsuite doesn't have tests for the new find behavior

Add tests.
  • Loading branch information
milroy committed Dec 18, 2024
1 parent daa589f commit 113a0a2
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
41 changes: 41 additions & 0 deletions t/data/resource/expected/find-format/jgf.expected.agfilter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"graph": {
"nodes": [
{
"id": "1",
"metadata": {
"type": "node",
"basename": "cab",
"id": 1234,
"exclusive": true,
"paths": {
"containment": "/cluster0/cab1234"
},
"agfilter": {
"core": "used:0, total:16"
}
}
},
{
"id": "0",
"metadata": {
"type": "cluster",
"id": 0,
"exclusive": true,
"paths": {
"containment": "/cluster0"
},
"agfilter": {
"core": "used:0, total:16"
}
}
}
],
"edges": [
{
"source": "0",
"target": "1"
}
]
}
}
7 changes: 7 additions & 0 deletions t/t1015-find-format.t
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ test_expect_success 'find/status: find status=up format=jgf works' '
test_cmp jgf.query.json jgf.json
'

test_expect_success 'find/agfilter: find agfilter=true format=jgf works' '
flux ion-resource find --format=jgf agfilter=true \
| tail -1 > jgf.agfilter.raw.json &&
normalize_json < jgf.agfilter.raw.json > jgf.json &&
test_cmp ${expected_basepath}/jgf.expected.agfilter.json jgf.json
'

test_expect_success 'find/status: removing fluxion modules' '
remove_qmanager &&
remove_resource
Expand Down

0 comments on commit 113a0a2

Please sign in to comment.