Skip to content

Commit

Permalink
testsuite: cover ingest priority
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Oct 15, 2018
1 parent 20beea5 commit 5aa817a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions t/t2200-job-ingest.t
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,32 @@ test_expect_success 'job-ingest: job announced to job manager' '
grep -q userid=$(id -u) jobman.out
'

test_expect_success 'job-ingest: priority stored in KVS' '
jobid=$(${SUBMITBENCH} ${JOBSPEC}/valid/basic.yaml) &&
kvsdir=$(flux job id --to=kvs-active $jobid) &&
jobpri=$(flux kvs get --json ${kvsdir}.priority) &&
test $jobpri -eq 16
'

test_expect_success 'job-ingest: instance owner can submit priority=31' '
jobid=$(${SUBMITBENCH} --priority=31 ${JOBSPEC}/valid/basic.yaml) &&
kvsdir=$(flux job id --to=kvs-active $jobid) &&
jobpri=$(flux kvs get --json ${kvsdir}.priority) &&
test $jobpri -eq 31
'

test_expect_success 'job-ingest: priority range is enforced' '
test_must_fail ${SUBMITBENCH} --priority=32 \
${JOBSPEC}/valid/basic.yaml &&
test_must_fail ${SUBMITBENCH} --priority="-1" \
${JOBSPEC}/valid/basic.yaml
'

test_expect_success 'job-ingest: guest cannot submit priority=17' '
! FLUX_HANDLE_ROLEMASK=0x2 \
${SUBMITBENCH} --priority=17 ${JOBSPEC}/valid/basic.yaml
'

test_expect_success 'job-ingest: valid jobspecs accepted' '
test_valid ${JOBSPEC}/valid/*
'
Expand Down

0 comments on commit 5aa817a

Please sign in to comment.