diff --git a/package.json b/package.json index ea270e0..0b8cde2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "12factorial", - "version": "0.5.2", + "version": "0.6.0", "repository": { "type": "git", "url": "https://github.com/bobthemighty/12factorial" diff --git a/test/index.js b/test/index.js index 58fd8bb..5124c72 100644 --- a/test/index.js +++ b/test/index.js @@ -395,4 +395,37 @@ describe('When extending a service', function () { expect(result.myservice.username).toBe('copper king') }); }); + +}); + + +describe('When using vault integration', function () { + + describe('When a value in vault is scalar', function () { + + var result; + + var cfg = { + creds: config.secret('secret/my-credentials') + }; + + beforeEach(function (done) { + // Write password here plz + + config.build(cfg, { vault: { addr: 'http://localhost:8200' } }) + .then(function (v) { + result = v; + done(); + }); + }); + + it('Should have read the password value', function () { + expect(result.creds.password).toBe("Brobdingnag") + }); + + it('Should have read the username value', function () { + expect(result.creds.password).toBe("Lilliput") + }); + }); + });