integration: update the gitlab config mandatory fields to match reality

This commit is contained in:
Fredrik Adelöw
2021-02-08 10:52:10 +01:00
parent abd85269fb
commit ffffea8e6d
12 changed files with 111 additions and 36 deletions
@@ -37,8 +37,10 @@ describe('GitLabPreparer', () => {
jest.clearAllMocks();
});
const preparer = GitlabPreparer.fromConfig({
host: 'gitlab.com',
host: '<ignored>',
token: 'fake-token',
apiBaseUrl: '<ignored>',
baseUrl: '<ignored>',
});
it(`calls the clone command with the correct arguments for a repository`, async () => {
@@ -57,6 +57,7 @@ describe('GitLab Publisher', () => {
const publisher = await GitlabPublisher.fromConfig(
{
host: 'gitlab.com',
apiBaseUrl: 'https://gitlab.com/api/v4',
token: 'fake-token',
baseUrl: 'https://gitlab.hosted.com',
},
@@ -105,7 +106,9 @@ describe('GitLab Publisher', () => {
const publisher = await GitlabPublisher.fromConfig(
{
host: 'gitlab.com',
apiBaseUrl: 'https://gitlab.com/api/v4',
token: 'fake-token',
baseUrl: 'https://gitlab.com',
},
{ repoVisibility: 'public' },
);
@@ -126,6 +126,8 @@ export class Publishers implements PublisherBuilder {
{
token: config.getOptionalString('scaffolder.gitlab.token') ?? '',
host: integration.config.host,
apiBaseUrl: `<ignored>`,
baseUrl: `https://${integration.config.host}`,
},
{ repoVisibility },
),