From d2f74008774d627154ee10e402e949e28d176445 Mon Sep 17 00:00:00 2001 From: Kevin L Date: Tue, 11 Jun 2024 07:17:46 -0400 Subject: [PATCH] Fix test suites for Azure Scaffolder Signed-off-by: Kevin L --- .../src/actions/azure.examples.test.ts | 2 ++ .../src/actions/azure.test.ts | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/plugins/scaffolder-backend-module-azure/src/actions/azure.examples.test.ts b/plugins/scaffolder-backend-module-azure/src/actions/azure.examples.test.ts index e00362c457..35868274fd 100644 --- a/plugins/scaffolder-backend-module-azure/src/actions/azure.examples.test.ts +++ b/plugins/scaffolder-backend-module-azure/src/actions/azure.examples.test.ts @@ -72,6 +72,7 @@ describe('publish:azure examples', () => { it('should call initRepoAndPush with the correct values', async () => { mockGitClient.createRepository.mockResolvedValue({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', }); @@ -94,6 +95,7 @@ describe('publish:azure examples', () => { it('should call initRepoAndPush with a changed default branch', async () => { mockGitClient.createRepository.mockResolvedValue({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', }); diff --git a/plugins/scaffolder-backend-module-azure/src/actions/azure.test.ts b/plugins/scaffolder-backend-module-azure/src/actions/azure.test.ts index a23eebb93a..34b226dbbf 100644 --- a/plugins/scaffolder-backend-module-azure/src/actions/azure.test.ts +++ b/plugins/scaffolder-backend-module-azure/src/actions/azure.test.ts @@ -131,6 +131,7 @@ describe('publish:azure', () => { it('should not throw if there is a token provided through ctx.input', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'http://google.com', + webUrl: 'http://google.com', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -188,6 +189,7 @@ describe('publish:azure', () => { it('should call the azureApis with the correct values', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'http://google.com', + webUrl: 'http://google.com', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -214,6 +216,7 @@ describe('publish:azure', () => { it('should call initRepoAndPush with the correct values', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -233,6 +236,7 @@ describe('publish:azure', () => { it('should call initRepoAndPush with the correct default branch', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -283,6 +287,7 @@ describe('publish:azure', () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -324,6 +329,7 @@ describe('publish:azure', () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', })); @@ -343,6 +349,7 @@ describe('publish:azure', () => { it('should call output with the remoteUrl the repoContentsUrl and the repositoryId', async () => { mockGitClient.createRepository.mockImplementation(() => ({ remoteUrl: 'https://dev.azure.com/organization/project/_git/repo', + webUrl: 'https://dev.azure.com/organization/project/_git/repo', id: '709e891c-dee7-4f91-b963-534713c0737f', }));