Skip to content

Commit

Permalink
testsuite: add persistent dw directive tests
Browse files Browse the repository at this point in the history
Problem: the testsuite has no tests to insure that
persistent DW directives work properly.

Add tests for creating, using, and destroying
persistent allocations.
  • Loading branch information
jameshcorbett committed Jun 22, 2023
1 parent 85b757f commit 6b29836
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions t/t1002-dws-workflow-obj.t
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,33 @@ test_expect_success 'job submission with valid DW string works after config chan
flux job wait-event -vt 15 -m status=0 ${jobid} finish &&
flux job wait-event -vt 5 -m description=${EPILOG_NAME} \
${jobid} epilog-start &&
flux job wait-event -vt 15 ${jobid} clean &&
flux job cancel ${DWS_JOBID}
flux job wait-event -vt 15 ${jobid} clean
'

test_expect_success 'job submission with persistent DW string works' '
flux run --setattr=system.dw="#DW create_persistent capacity=10GiB type=lustre name=project1" \
-N1 -n1 -c1 hostname &&
jobid=$(flux submit --setattr=system.dw="#DW persistentdw name=project1" \
-N1 -n1 hostname) &&
flux job wait-event -vt 30 -m description=${PROLOG_NAME} \
${jobid} prolog-start &&
flux job wait-event -vt 30 -m status=0 ${jobid} finish &&
flux job wait-event -vt 30 -m description=${EPILOG_NAME} \
${jobid} epilog-start &&
flux job wait-event -vt 30 ${jobid} clean &&
jobid=$(flux submit --setattr=system.dw="#DW persistentdw name=project1" \
-N1 -n1 hostname) &&
flux job wait-event -vt 30 -m description=${PROLOG_NAME} \
${jobid} prolog-start &&
flux job wait-event -vt 30 -m status=0 ${jobid} finish &&
flux job wait-event -vt 30 -m description=${EPILOG_NAME} \
${jobid} epilog-start &&
flux job wait-event -vt 30 ${jobid} clean &&
jobid=$(flux submit --setattr=system.dw="#DW destroy_persistent name=project1" \
-N1 -n1 -c1 hostname) &&
flux job wait-event -vt 30 -m description=${EPILOG_NAME} \
${jobid} epilog-start &&
flux job wait-event -vt 30 ${jobid} clean
'

test_done

0 comments on commit 6b29836

Please sign in to comment.