Fix bug with tlsSkipVerify and add test coverage

This commit is contained in:
Jason O'Donnell 2020-08-07 14:57:44 -04:00
parent 6cf013b5c0
commit e5ef6c9c11
5 changed files with 32 additions and 3 deletions

View file

@ -9,5 +9,6 @@ describe('e2e-tls', () => {
expect(process.env.OTHERALTSECRET).toBe("OTHERCUSTOMSECRET");
expect(process.env.FOO).toBe("bar");
expect(process.env.NAMED_CUBBYSECRET).toBe("zap");
expect(process.env.SKIP).toBe("true");
});
});

View file

@ -113,6 +113,23 @@ const clientKeyRaw = `${process.env.VAULT_CLIENT_KEY}`;
}
});
await got(`https://${vaultUrl}/v1/secret/data/tlsSkipVerify`, {
method: 'POST',
headers: {
'X-Vault-Token': rootToken,
},
https: {
certificateAuthority: caCertificate,
certificate: clientCertificate,
key: clientKey,
},
json: {
data: {
skip: 'true',
},
}
});
await got(`https://${vaultUrl}/v1/sys/mounts/my-secret`, {
method: 'POST',
headers: {