fix: keys with the same path getting overwritten

This commit is contained in:
Richard Simpson 2019-09-20 17:44:10 -05:00
parent b524055d38
commit 9c32e02d93
No known key found for this signature in database
GPG key ID: 0CECAF50D013D1E2
3 changed files with 54 additions and 23 deletions

View file

@ -85,4 +85,19 @@ describe('integration', () => {
expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET');
});
it('get multiple secrets', async () => {
mockInput(`
test secret ;
test secret | NAMED_SECRET ;
nested/test otherSecret ;`);
await exportSecrets();
expect(core.exportVariable).toBeCalledTimes(3);
expect(core.exportVariable).toBeCalledWith('SECRET', 'SUPERSECRET');
expect(core.exportVariable).toBeCalledWith('NAMED_SECRET', 'SUPERSECRET');
expect(core.exportVariable).toBeCalledWith('OTHERSECRET', 'OTHERSUPERSECRET');
});
});