Skip to content

Commit

Permalink
changed vault error message
Browse files Browse the repository at this point in the history
  • Loading branch information
saksham-postman committed Nov 5, 2024
1 parent 24d6dc7 commit fe1072d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/runner/extensions/event.command.js
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ module.exports = {
const dispatch = (e, r) => { this.host.dispatch(EXECUTION_VAULT_BASE + executionId, id, e, r); };

if (!hasVaultAccess) {
return dispatch('Vault access denied');
return dispatch('Vault access denied. Check your Vault settings.');
}

if (!['get', 'set', 'unset'].includes(cmd)) {
Expand Down
9 changes: 5 additions & 4 deletions test/integration/sanity/vaultSecrets.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,8 @@ describe('vaultSecrets', function () {
'exception.calledOnce': true
});

expect(testrun.exception.firstCall.args[1]).to.have.property('message', 'Vault access denied');
// eslint-disable-next-line @stylistic/js/max-len
expect(testrun.exception.firstCall.args[1]).to.have.property('message', 'Vault access denied. Check your Vault settings.');
});

it('should not contain vault secrets', function () {
Expand Down Expand Up @@ -1138,7 +1139,7 @@ describe('vaultSecrets', function () {
it('should deny vault access for item2', function () {
var prConsoleArgs = testrun.console.getCall(1).args.slice(2);

expect(prConsoleArgs).to.deep.equal(['Vault access denied']);
expect(prConsoleArgs).to.deep.equal(['ault access denied. Check your Vault settings.']);
});
});

Expand Down Expand Up @@ -1188,7 +1189,7 @@ describe('vaultSecrets', function () {
var consoleArgs = testrun.console.getCall(0).args.slice(2);

expect(consoleArgs[0]).to.equal('Vault error:');
expect(consoleArgs[1]).to.equal('Vault access denied');
expect(consoleArgs[1]).to.equal('Vault access denied. Check your Vault settings.');
});
});

Expand Down Expand Up @@ -1238,7 +1239,7 @@ describe('vaultSecrets', function () {
var consoleArgs = testrun.console.getCall(0).args.slice(2);

expect(consoleArgs[0]).to.equal('Vault error:');
expect(consoleArgs[1]).to.equal('Vault access denied');
expect(consoleArgs[1]).to.equal('Vault access denied. Check your Vault settings.');
});
});
});
Expand Down

0 comments on commit fe1072d

Please sign in to comment.