diff --git a/.github/workflows/lambda-runners.yml b/.github/workflows/lambda-runners.yml index 6aeca668..fe33c1a4 100644 --- a/.github/workflows/lambda-runners.yml +++ b/.github/workflows/lambda-runners.yml @@ -26,5 +26,9 @@ jobs: run: yarn lint - name: Run tests run: yarn test + - name: Run two tests in isolation + run: | + yarn run test src/scale-runners/scale-up.test.ts -t 'scaleUp with GHES on org level creates a runner with labels in s specific group' --coverage=false + yarn run test src/scale-runners/scale-up.test.ts -t 'scaleUp with public GH on org level creates a runner with labels in s specific group' --coverage=false - name: Build distribution run: yarn build diff --git a/modules/runners/lambdas/runners/src/scale-runners/scale-up.test.ts b/modules/runners/lambdas/runners/src/scale-runners/scale-up.test.ts index 765afa0d..82191bc4 100644 --- a/modules/runners/lambdas/runners/src/scale-runners/scale-up.test.ts +++ b/modules/runners/lambdas/runners/src/scale-runners/scale-up.test.ts @@ -112,28 +112,28 @@ beforeEach(() => { owner: TEST_DATA.repositoryOwner, }, ]); + + mockedAppAuth.mockResolvedValue({ + type: 'app', + token: 'token', + appId: TEST_DATA.installationId, + expiresAt: 'some-date', + }); + mockedInstallationAuth.mockResolvedValue({ + type: 'token', + tokenType: 'installation', + token: 'token', + createdAt: 'some-date', + expiresAt: 'some-date', + permissions: {}, + repositorySelection: 'all', + }); + + mockCreateClient.mockResolvedValue(new mocktokit()); }); describe('scaleUp with GHES', () => { beforeEach(() => { - mockedAppAuth.mockResolvedValue({ - type: 'app', - token: 'token', - appId: TEST_DATA.installationId, - expiresAt: 'some-date', - }); - mockedInstallationAuth.mockResolvedValue({ - type: 'token', - tokenType: 'installation', - token: 'token', - createdAt: 'some-date', - expiresAt: 'some-date', - permissions: {}, - repositorySelection: 'all', - }); - - mockCreateClient.mockResolvedValue(new mocktokit()); - process.env.GHES_URL = 'https://github.enterprise.something'; });