From c6e5683179eb1d0a32c1642b6541d7056a26264e Mon Sep 17 00:00:00 2001 From: Jurre Stender Date: Mon, 26 Jul 2021 17:04:38 +0200 Subject: [PATCH] Grab job/credentials tokens from env This makes it easier for everyone to put in credentials without accidentally committing them, and as a bonus will also prevent secret scanning from firing on these. --- __tests__/updater-integration.test.ts | 4 ++-- __tests__/updater.test.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/updater-integration.test.ts b/__tests__/updater-integration.test.ts index d8a86ad..5022c41 100644 --- a/__tests__/updater-integration.test.ts +++ b/__tests__/updater-integration.test.ts @@ -23,8 +23,8 @@ describe('Updater', () => { getCredentials: jest.fn(), params: { jobID: 1, - jobToken: 'xxx', - credentialsToken: 'yyy', + jobToken: process.env.JOB_TOKEN, + credentialsToken: process.env.CREDENTIALS_TOKEN, dependabotAPIURL: 'http://host.docker.internal:3001' } } diff --git a/__tests__/updater.test.ts b/__tests__/updater.test.ts index 519c709..28ba5c1 100644 --- a/__tests__/updater.test.ts +++ b/__tests__/updater.test.ts @@ -8,9 +8,9 @@ describe('Updater', () => { getCredentials: jest.fn(), params: { jobID: 1, - jobToken: 'xxx', - credentialsToken: 'yyy', - dependabotAPIURL: 'http://localhost' + jobToken: process.env.JOB_TOKEN, + credentialsToken: process.env.CREDENTIALS_TOKEN, + dependabotAPIURL: 'http://host.docker.internal:3001' } } const updater = new Updater(docker, mockAPIClient)