From 50173aa1e8a8b2adbb23ec166b86e1c66ae5fe1b Mon Sep 17 00:00:00 2001 From: Frostebite Date: Fri, 24 Dec 2021 03:55:22 +0000 Subject: [PATCH] Test custom secret setup correctly --- src/model/cloud-runner/cloud-runner.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/model/cloud-runner/cloud-runner.test.ts b/src/model/cloud-runner/cloud-runner.test.ts index 8c0f599b..fe6e2f94 100644 --- a/src/model/cloud-runner/cloud-runner.test.ts +++ b/src/model/cloud-runner/cloud-runner.test.ts @@ -8,6 +8,8 @@ describe('Cloud Runner', () => { it('responds', () => {}); }); describe('Cloud Runner', () => { + const testSecretName = 'testSecretName'; + const testSecretValue = 'testSecretValue'; Input.cliOptions = { versioning: 'None', projectPath: 'test-project', @@ -16,8 +18,8 @@ describe('Cloud Runner', () => { image: 'alpine' commands: ['printenv'] secrets: - - name: 'testCustomSecret' - value: 'VALUEXXX' + - name: '${testSecretName}' + value: '${testSecretValue}' `, }; Input.githubEnabled = false; @@ -29,6 +31,7 @@ describe('Cloud Runner', () => { await CloudRunner.run(buildParameter, baseImage.toString()); const file = fs.readFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, 'utf-8').toString(); expect(file).toContain(JSON.stringify(buildParameter)); + expect(file).toContain(`${testSecretName}=${testSecretValue}`); const inputKeys = Object.getOwnPropertyNames(Input); for (const element of inputKeys) { if (Input[element] !== undefined && typeof Input[element] != 'function') {