aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/runners.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/runners.ts')
-rw-r--r--server/tests/api/check-params/runners.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/tests/api/check-params/runners.ts b/server/tests/api/check-params/runners.ts
index 7d70c412e..9112ff716 100644
--- a/server/tests/api/check-params/runners.ts
+++ b/server/tests/api/check-params/runners.ts
@@ -41,6 +41,7 @@ describe('Test managing runners', function () {
41 let completedJobToken: string 41 let completedJobToken: string
42 let completedJobUUID: string 42 let completedJobUUID: string
43 43
44 let cancelledJobToken: string
44 let cancelledJobUUID: string 45 let cancelledJobUUID: string
45 46
46 before(async function () { 47 before(async function () {
@@ -86,6 +87,7 @@ describe('Test managing runners', function () {
86 87
87 { 88 {
88 const { job } = await server.runnerJobs.autoAccept({ runnerToken }) 89 const { job } = await server.runnerJobs.autoAccept({ runnerToken })
90 cancelledJobToken = job.jobToken
89 cancelledJobUUID = job.uuid 91 cancelledJobUUID = job.uuid
90 await server.runnerJobs.cancelByAdmin({ jobUUID: cancelledJobUUID }) 92 await server.runnerJobs.cancelByAdmin({ jobUUID: cancelledJobUUID })
91 } 93 }
@@ -639,10 +641,10 @@ describe('Test managing runners', function () {
639 641
640 it('Should fail with a job not in processing state', async function () { 642 it('Should fail with a job not in processing state', async function () {
641 await server.runnerJobs.update({ 643 await server.runnerJobs.update({
642 jobUUID: completedJobUUID, 644 jobUUID: cancelledJobUUID,
643 jobToken: completedJobToken, 645 jobToken: cancelledJobToken,
644 runnerToken, 646 runnerToken,
645 expectedStatus: HttpStatusCode.BAD_REQUEST_400 647 expectedStatus: HttpStatusCode.NOT_FOUND_404
646 }) 648 })
647 }) 649 })
648 }) 650 })