From ccc7cef6ebb57a1ac2d171f4116154b81f917327 Mon Sep 17 00:00:00 2001 From: JM Faircloth Date: Wed, 5 Jul 2023 12:49:58 -0500 Subject: [PATCH] fix test string format --- .github/workflows/build.yml | 9 ++------- integrationTests/e2e/e2e.test.js | 6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f57f451..5afe351 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -180,22 +180,17 @@ jobs: secrets: | secret/data/subsequent-test secret | SUBSEQUENT_TEST_SECRET; - - name: Test Parsing Secrets (part 1/2) + - name: Test JSON Secrets # this step sets up secres to be used in Test Parsing Secrets (part 2/2) uses: ./ with: url: http://localhost:8200 token: testtoken secrets: | + secret/data/test-json-data jsonData; secret/data/test-json-string jsonString; secret/data/test-json-string-multiline jsonStringMultiline; - - name: Test Parsing Secrets (part 2/2) - # this step will call a JS script to test that we can successfully parse - # JSON string data into JS objects - run: | - node ./scripts/parse.js - - name: Verify Vault Action Outputs run: npm run test:integration:e2e env: diff --git a/integrationTests/e2e/e2e.test.js b/integrationTests/e2e/e2e.test.js index 7e6a6a2..35227b0 100644 --- a/integrationTests/e2e/e2e.test.js +++ b/integrationTests/e2e/e2e.test.js @@ -11,8 +11,8 @@ describe('e2e', () => { expect(process.env.NAMED_CUBBYSECRET).toBe("zap"); expect(process.env.SUBSEQUENT_TEST_SECRET).toBe("SUBSEQUENT_TEST_SECRET"); expect(process.env.JSONSTRING).toBe('{"x":1,"y":"qux"}'); - expect(process.env.JSONSTRINGMULTILINE).toBe('{"x":1,"y":"q\\nux"}'); - expect(process.env.JSONDATA).toBe('{"x":1,"y":"qux"}'); + expect(process.env.JSONSTRINGMULTILINE).toBe('{"x": 1, "y": "q\\nux"}'); + expect(process.env.JSONDATA).toBe('{"x": 1, "y": "qux"}'); }); it('verify jsonstring', () => { @@ -22,6 +22,6 @@ describe('e2e', () => { expect(process.env.JSONSTRINGMULTILINE).toBe('{"x":1,"y":"q\\nux"}'); }); it('verify jsondata', () => { - expect(process.env.JSONDATA).toBe('{"x":1,"y":"qux"}'); + expect(process.env.JSONDATA).toBe('{"x": 1, "y": "qux"}'); }); });