From d87452277407ef6ab3a368d4b0434b8b80eb7a64 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 12 Jul 2023 11:09:29 +0200 Subject: Avoid update remote runner error --- server/tests/api/check-params/runners.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/tests/api') 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 () { let completedJobToken: string let completedJobUUID: string + let cancelledJobToken: string let cancelledJobUUID: string before(async function () { @@ -86,6 +87,7 @@ describe('Test managing runners', function () { { const { job } = await server.runnerJobs.autoAccept({ runnerToken }) + cancelledJobToken = job.jobToken cancelledJobUUID = job.uuid await server.runnerJobs.cancelByAdmin({ jobUUID: cancelledJobUUID }) } @@ -639,10 +641,10 @@ describe('Test managing runners', function () { it('Should fail with a job not in processing state', async function () { await server.runnerJobs.update({ - jobUUID: completedJobUUID, - jobToken: completedJobToken, + jobUUID: cancelledJobUUID, + jobToken: cancelledJobToken, runnerToken, - expectedStatus: HttpStatusCode.BAD_REQUEST_400 + expectedStatus: HttpStatusCode.NOT_FOUND_404 }) }) }) -- cgit v1.2.3