From 24f3c907c65a8f7698b8e4c8d740847c59d0c464 Mon Sep 17 00:00:00 2001 From: Billy Michael Date: Mon, 1 Apr 2024 15:13:46 +0100 Subject: [PATCH] chore: fix failing bitbucket example tests Signed-off-by: Billy Michael --- .../src/actions/bitbucket.examples.test.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucket.examples.test.ts b/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucket.examples.test.ts index c8f35fa0bf..6633246d70 100644 --- a/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucket.examples.test.ts +++ b/plugins/scaffolder-backend-module-bitbucket/src/actions/bitbucket.examples.test.ts @@ -110,7 +110,7 @@ describe('publish:bitbucket', () => { auth: { username: 'x-token-auth', password: 'tokenlols' }, logger: mockContext.logger, commitMessage: 'initial commit', - gitAuthorInfo: {}, + gitAuthorInfo: { email: undefined, name: undefined }, }); }); @@ -151,7 +151,7 @@ describe('publish:bitbucket', () => { auth: { username: 'x-token-auth', password: 'tokenlols' }, logger: mockContext.logger, commitMessage: 'initial commit', - gitAuthorInfo: {}, + gitAuthorInfo: { email: undefined, name: undefined }, }); }); @@ -189,9 +189,9 @@ describe('publish:bitbucket', () => { remoteUrl: 'https://bitbucket.org/workspace/cloneurl', auth: { username: 'x-token-auth', password: 'tokenlols' }, logger: mockContext.logger, - defaultBranch: 'main', + defaultBranch: 'master', commitMessage: 'initial commit', - gitAuthorInfo: {}, + gitAuthorInfo: { email: undefined, name: undefined }, }); }); @@ -229,9 +229,12 @@ describe('publish:bitbucket', () => { remoteUrl: 'https://bitbucket.org/workspace/cloneurl', auth: { username: 'x-token-auth', password: 'your-auth-token' }, logger: mockContext.logger, - defaultBranch: 'main', + defaultBranch: 'master', commitMessage: 'initial commit', - gitAuthorInfo: {}, + gitAuthorInfo: { + email: undefined, + name: undefined, + }, }); }); @@ -268,9 +271,9 @@ describe('publish:bitbucket', () => { expect(initRepoAndPush).toHaveBeenCalledWith({ dir: mockContext.workspacePath, remoteUrl: 'https://bitbucket.org/workspace/cloneurl', - auth: { username: 'x-token-auth', password: 'your-auth-token' }, + auth: { username: 'x-token-auth', password: 'tokenlols' }, logger: mockContext.logger, - defaultBranch: 'main', + defaultBranch: 'master', commitMessage: 'Initial commit with custom message', gitAuthorInfo: { email: undefined, name: undefined }, }); @@ -309,10 +312,10 @@ describe('publish:bitbucket', () => { expect(initRepoAndPush).toHaveBeenCalledWith({ dir: mockContext.workspacePath, remoteUrl: 'https://bitbucket.org/workspace/cloneurl', - auth: { username: 'x-token-auth', password: 'your-auth-token' }, + auth: { username: 'x-token-auth', password: 'tokenlols' }, logger: mockContext.logger, - defaultBranch: 'main', - commitMessage: 'Initial commit with custom message', + defaultBranch: 'master', + commitMessage: 'initial commit', gitAuthorInfo: { email: 'your.email@example.com', name: 'Your Name' }, }); });