From d118c0c07f445b63edc33507007af0608048a620 Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 20 Jan 2021 12:57:07 +0100 Subject: [PATCH] chore(scaffolder-backend/gitlab): added a test to check that the baseUrl is passed through in config --- .../src/scaffolder/stages/publish/gitlab.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/gitlab.test.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/gitlab.test.ts index ce207b02c0..11b32a6de5 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/gitlab.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/gitlab.test.ts @@ -52,6 +52,7 @@ describe('GitLab Publisher', () => { const publisher = await GitlabPublisher.fromConfig({ host: 'gitlab.com', token: 'fake-token', + baseUrl: 'https://gitlab.hosted.com', }); mockGitlabClient.Namespaces.show.mockResolvedValue({ @@ -71,6 +72,10 @@ describe('GitLab Publisher', () => { logger, }); + expect(Gitlab).toHaveBeenCalledWith({ + token: 'fake-token', + host: 'https://gitlab.hosted.com', + }); expect(result).toEqual({ remoteUrl: 'mockclone', catalogInfoUrl: 'mockclone',