mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-07-26 00:13:16 +03:00
fix test string format
This commit is contained in:
@@ -180,22 +180,17 @@ jobs:
|
|||||||
secrets: |
|
secrets: |
|
||||||
secret/data/subsequent-test secret | SUBSEQUENT_TEST_SECRET;
|
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)
|
# this step sets up secres to be used in Test Parsing Secrets (part 2/2)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
url: http://localhost:8200
|
url: http://localhost:8200
|
||||||
token: testtoken
|
token: testtoken
|
||||||
secrets: |
|
secrets: |
|
||||||
|
secret/data/test-json-data jsonData;
|
||||||
secret/data/test-json-string jsonString;
|
secret/data/test-json-string jsonString;
|
||||||
secret/data/test-json-string-multiline jsonStringMultiline;
|
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
|
- name: Verify Vault Action Outputs
|
||||||
run: npm run test:integration:e2e
|
run: npm run test:integration:e2e
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ describe('e2e', () => {
|
|||||||
expect(process.env.NAMED_CUBBYSECRET).toBe("zap");
|
expect(process.env.NAMED_CUBBYSECRET).toBe("zap");
|
||||||
expect(process.env.SUBSEQUENT_TEST_SECRET).toBe("SUBSEQUENT_TEST_SECRET");
|
expect(process.env.SUBSEQUENT_TEST_SECRET).toBe("SUBSEQUENT_TEST_SECRET");
|
||||||
expect(process.env.JSONSTRING).toBe('{"x":1,"y":"qux"}');
|
expect(process.env.JSONSTRING).toBe('{"x":1,"y":"qux"}');
|
||||||
expect(process.env.JSONSTRINGMULTILINE).toBe('{"x":1,"y":"q\\nux"}');
|
expect(process.env.JSONSTRINGMULTILINE).toBe('{"x": 1, "y": "q\\nux"}');
|
||||||
expect(process.env.JSONDATA).toBe('{"x":1,"y":"qux"}');
|
expect(process.env.JSONDATA).toBe('{"x": 1, "y": "qux"}');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('verify jsonstring', () => {
|
it('verify jsonstring', () => {
|
||||||
@@ -22,6 +22,6 @@ describe('e2e', () => {
|
|||||||
expect(process.env.JSONSTRINGMULTILINE).toBe('{"x":1,"y":"q\\nux"}');
|
expect(process.env.JSONSTRINGMULTILINE).toBe('{"x":1,"y":"q\\nux"}');
|
||||||
});
|
});
|
||||||
it('verify jsondata', () => {
|
it('verify jsondata', () => {
|
||||||
expect(process.env.JSONDATA).toBe('{"x":1,"y":"qux"}');
|
expect(process.env.JSONDATA).toBe('{"x": 1, "y": "qux"}');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user