From 5c618dc12d98b760c06a5cef40ba44575b685768 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Tue, 6 Feb 2024 01:49:34 +0000 Subject: [PATCH] fix --- .../tests/cloud-runner-async-workflow.test.ts | 2 +- .../tests/cloud-runner-github-checks.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/model/cloud-runner/tests/cloud-runner-async-workflow.test.ts b/src/model/cloud-runner/tests/cloud-runner-async-workflow.test.ts index 1ac062260..d1e3210dc 100644 --- a/src/model/cloud-runner/tests/cloud-runner-async-workflow.test.ts +++ b/src/model/cloud-runner/tests/cloud-runner-async-workflow.test.ts @@ -32,7 +32,7 @@ describe('Cloud Runner Async Workflows', () => { // Run the job await CloudRunner.run(buildParameter, baseImage.toString()); const result = await GitHub.getCheckStatus(); - expect(result).toBe(`success`); + expect(result.status.toString()[0]).toEqual('2'); // wait for 15 seconds await new Promise((resolve) => setTimeout(resolve, 15_000)); diff --git a/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts b/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts index 23bbb67a0..adb5b4b6d 100644 --- a/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts +++ b/src/model/cloud-runner/tests/cloud-runner-github-checks.test.ts @@ -29,9 +29,9 @@ describe('Cloud Runner Github Checks', () => { githubChecks: `true`, }); await CloudRunner.setup(buildParameter); - CloudRunner.buildParameters.githubCheckId = await GitHub.createGitHubCheck(`create`); - await GitHub.updateGitHubCheck(`direct`, `update`); - await GitHub.updateGitHubCheck(`direct`, `update 2`, `success`, `completed`); + CloudRunner.buildParameters.githubCheckId = await GitHub.createGitHubCheck(`direct create`); + await GitHub.updateGitHubCheck(`1 ${new Date().toISOString()}`, `direct`); + await GitHub.updateGitHubCheck(`2 ${new Date().toISOString()}`, `direct`, `success`, `completed`); }, TIMEOUT_INFINITE, ); @@ -49,8 +49,8 @@ describe('Cloud Runner Github Checks', () => { GitHub.forceAsyncTest = true; await CloudRunner.setup(buildParameter); CloudRunner.buildParameters.githubCheckId = await GitHub.createGitHubCheck(`async create`); - await GitHub.updateGitHubCheck(`async Workflow`, `async update`); - await GitHub.updateGitHubCheck(`direct`, `async update 2`, `success`, `completed`); + await GitHub.updateGitHubCheck(`1 ${new Date().toISOString()}`, `async`); + await GitHub.updateGitHubCheck(`2 ${new Date().toISOString()}`, `async`, `success`, `completed`); GitHub.forceAsyncTest = false; }, TIMEOUT_INFINITE,