Skip to content

Commit

Permalink
test: add dws tests for copy_ directives
Browse files Browse the repository at this point in the history
Problem: there are no tests for copy_in and copy_out directives.
The tests will have to be simple because no global lustre file
system will exist for doing the actual copying.

Add some basic tests.
  • Loading branch information
jameshcorbett committed Jun 29, 2024
1 parent 9ea0a39 commit 453f60e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions t/t1002-dws-workflow-obj.t
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,26 @@ test_expect_success 'job submission with multiple valid DW strings in a JSON fil
flux job wait-event -vt 15 ${jobid} clean
'

test_expect_success 'job submission with invalid copy_in DW directive fails' '
jobid=$(flux submit --setattr=system.dw="#DW jobdw capacity=10GiB type=lustre name=project2 \
#DW copy_in source=/some/fake/dir destination=\$DW_JOB_project2/" \
-N1 -n1 hostname) &&
flux job wait-event -vt 10 -m description=${CREATE_DEP_NAME} \
${jobid} dependency-add &&
flux job wait-event -vt 15 ${jobid} exception &&
flux job wait-event -vt 15 ${jobid} clean
'

test_expect_success 'job submission with invalid copy_out DW directive fails' '
jobid=$(flux submit --setattr=system.dw="#DW jobdw capacity=10GiB type=lustre name=project3 \
#DW copy_out source=\$DW_JOB_project3/ destination=/some/fake/dir" \
-N1 -n1 hostname) &&
flux job wait-event -vt 10 -m description=${CREATE_DEP_NAME} \
${jobid} dependency-add &&
flux job wait-event -vt 15 ${jobid} exception &&
flux job wait-event -vt 15 ${jobid} clean
'

test_expect_success 'job-manager: dependency plugin works when validation fails' '
jobid=$(flux submit --setattr=system.dw="foo" hostname) &&
flux job wait-event -vt 5 -m description=${CREATE_DEP_NAME} \
Expand Down

0 comments on commit 453f60e

Please sign in to comment.