Skip to content

Commit 3722777

Browse files
gaijin03agilmor
authored andcommitted
Testsuite - Improve test_112_4[4-5] move admin level setting
It's not really changing the test, but moving the AdminLevel to a more logical place, before JobModify is set. Ticket: 24081
1 parent ad18260 commit 3722777

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

‎testsuite/python/tests/test_112_44.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,12 @@ def test_jobs(slurm, slurmdb, non_admin):
12631263
atf.wait_for_job_accounted(jobid1, "State", "COMPLETED", fatal=True)
12641264
atf.wait_for_job_accounted(jobid2, "State", "COMPLETED", fatal=True)
12651265

1266+
atf.run_command(
1267+
f"sacctmgr -i mod user {local_cluster_name} set AdminLevel=Admin",
1268+
user=atf.properties["slurm-user"],
1269+
fatal=True,
1270+
)
1271+
12661272
WIFEXIT_CODE = V0044Uint32NoValStruct(
12671273
set=True, infinite=False, number=4 # 1024 >> 8
12681274
)
@@ -1283,11 +1289,6 @@ def test_jobs(slurm, slurmdb, non_admin):
12831289
wckey="mywckey1",
12841290
)
12851291

1286-
atf.run_command(
1287-
f"sacctmgr -i mod user {local_cluster_name} set AdminLevel=Admin",
1288-
user=atf.properties["slurm-user"],
1289-
fatal=True,
1290-
)
12911292
resp = slurmdb.slurmdb_v0044_post_job(str(jobid1), v0044_job_modify=job_modify)
12921293
assert len(resp.warnings) == 0
12931294
assert len(resp.errors) == 0

‎testsuite/python/tests/test_112_45.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,6 +1267,12 @@ def test_jobs(slurm, slurmdb, non_admin):
12671267
atf.wait_for_job_accounted(jobid1, "End", fatal=True)
12681268
atf.wait_for_job_accounted(jobid2, "End", fatal=True)
12691269

1270+
atf.run_command(
1271+
f"sacctmgr -i mod user {local_cluster_name} set AdminLevel=Admin",
1272+
user=atf.properties["slurm-user"],
1273+
fatal=True,
1274+
)
1275+
12701276
WIFEXIT_CODE = V0045Uint32NoValStruct(
12711277
set=True, infinite=False, number=4 # 1024 >> 8
12721278
)
@@ -1287,11 +1293,6 @@ def test_jobs(slurm, slurmdb, non_admin):
12871293
wckey="mywckey1",
12881294
)
12891295

1290-
atf.run_command(
1291-
f"sacctmgr -i mod user {local_cluster_name} set AdminLevel=Admin",
1292-
user=atf.properties["slurm-user"],
1293-
fatal=True,
1294-
)
12951296
resp = slurmdb.slurmdb_v0045_post_job(str(jobid1), v0045_job_modify=job_modify)
12961297
assert len(resp.warnings) == 0
12971298
assert len(resp.errors) == 0

0 commit comments

Comments
 (0)