mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-03-29 06:06:53 +00:00
fix wildcard handling when field contains dot (#542)
* fix wildcard handling when field contains dot * changelog
This commit is contained in:
parent
66531b2752
commit
47dbc643a8
4 changed files with 60 additions and 26 deletions
|
|
@ -31,6 +31,14 @@ describe('integration', () => {
|
|||
},
|
||||
});
|
||||
|
||||
await got(`${vaultUrl}/v1/secret/data/test-with-dot-char`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-Vault-Token': vaultToken,
|
||||
},
|
||||
body: `{"data":{"secret.foo":"SUPERSECRET"}}`
|
||||
});
|
||||
|
||||
await got(`${vaultUrl}/v1/secret/data/nested/test`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -193,6 +201,16 @@ describe('integration', () => {
|
|||
expect(core.exportVariable).toBeCalledWith('OTHERSECRETDASH', 'OTHERSUPERSECRET');
|
||||
});
|
||||
|
||||
it('get wildcard secrets with dot char', async () => {
|
||||
mockInput(`secret/data/test-with-dot-char * ;`);
|
||||
|
||||
await exportSecrets();
|
||||
|
||||
expect(core.exportVariable).toBeCalledTimes(1);
|
||||
|
||||
expect(core.exportVariable).toBeCalledWith('SECRET__FOO', 'SUPERSECRET');
|
||||
});
|
||||
|
||||
it('get wildcard secrets', async () => {
|
||||
mockInput(`secret/data/test * ;`);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue