Skip to content

Commit a43f24f

Browse files
committed
testsuite: add coverage for job-info.lookup input
Problem: Several bad input cases are not tested agains the job-info.lookup RPC target. Add coverage in t2230-job-info-lookup.t.
1 parent 594b7f1 commit a43f24f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

t/t2230-job-info-lookup.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,19 @@ test_expect_success 'lookup request with empty payload fails with EPROTO(71)' '
322322
${RPC} job-info.lookup 71 </dev/null
323323
'
324324

325+
test_expect_success 'lookup request with keys not and array fails with EPROTO(71)' '
326+
$jq -j -c -n "{id:12345, keys:1, flags:0}" \
327+
| ${RPC} job-info.lookup 71
328+
'
329+
330+
test_expect_success 'lookup request with invalid keys fails with EPROTO(71)' '
331+
$jq -j -c -n "{id:12345, keys:[1], flags:0}" \
332+
| ${RPC} job-info.lookup 71
333+
'
334+
335+
test_expect_success 'lookup request with invalid flags fails with EPROTO(71)' '
336+
$jq -j -c -n "{id:12345, keys:[\"jobspec\"], flags:8191}" \
337+
| ${RPC} job-info.lookup 71
338+
'
339+
325340
test_done

0 commit comments

Comments
 (0)