From 3946c14dde528e3a9d4eacddc82e870b49ce2444 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Wed, 16 Oct 2024 14:50:50 -0400 Subject: [PATCH] remove gc and netlify build tests --- tests/unit/job/stagingJobHandler.test.ts | 47 ------------------------ 1 file changed, 47 deletions(-) diff --git a/tests/unit/job/stagingJobHandler.test.ts b/tests/unit/job/stagingJobHandler.test.ts index 0b576d497..92a5ff004 100644 --- a/tests/unit/job/stagingJobHandler.test.ts +++ b/tests/unit/job/stagingJobHandler.test.ts @@ -90,51 +90,4 @@ describe('StagingJobHandler Tests', () => { expect(queueManifestJobSpy).toBeCalledTimes(0); expect(jobHandlerTestHelper.jobRepo.insertJob).toBeCalledTimes(0); }); - - describe('Gatsby Cloud build hooks', () => { - beforeEach(() => { - process.env.GATSBY_CLOUD_PREVIEW_WEBHOOK_ENABLED = 'true'; - }); - - test('Staging with Gatsby Cloud site does not result in immediate job completion', async () => { - jobHandlerTestHelper.setStageForDeploySuccess(false, undefined, { hasGatsbySiteId: true }); - await jobHandlerTestHelper.jobHandler.execute(); - // Post-build webhook is expected to update the status - expect(jobHandlerTestHelper.jobRepo.updateWithStatus).toBeCalledTimes(0); - }); - - test('Gatsby Cloud build hook fail results in job failure', async () => { - jobHandlerTestHelper.setStageForDeploySuccess(false, undefined, { hasGatsbySiteId: true }); - spyPost.mockImplementationOnce(() => Promise.reject({})); - await jobHandlerTestHelper.jobHandler.execute(); - expect(jobHandlerTestHelper.jobRepo.updateWithErrorStatus).toBeCalledTimes(1); - }); - }); - - describe('Netlify build hooks', () => { - beforeEach(() => { - process.env.GATSBY_CLOUD_PREVIEW_WEBHOOK_ENABLED = 'true'; - }); - - test('Staging with Netlify does not result in immediate job completion with Gatsby Cloud', async () => { - jobHandlerTestHelper.setStageForDeploySuccess(false, undefined, { - hasGatsbySiteId: true, - hasNetlifyBuildHook: true, - }); - await jobHandlerTestHelper.jobHandler.execute(); - // Post-build webhook is expected to update the status - expect(jobHandlerTestHelper.jobRepo.updateWithStatus).toBeCalledTimes(0); - }); - - test('Netlify build hook error does not interfere with job execution', async () => { - jobHandlerTestHelper.setStageForDeploySuccess(false, undefined, { hasNetlifyBuildHook: true }); - spyPost.mockImplementationOnce(() => Promise.reject({})); - await jobHandlerTestHelper.jobHandler.execute(); - expect(jobHandlerTestHelper.jobRepo.updateWithStatus).toBeCalledWith( - expect.anything(), - undefined, - JobStatus.completed - ); - }); - }); });