Skip to content

Commit

Permalink
flag name change
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Apr 30, 2024
1 parent 1b6586e commit 1c6b5ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions lib/IAMClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ class VaultClient {
const quotaIsValid = typeof quota === 'number' && !Number.isNaN(Number.parseInt(quota, 10)) && quota > 0;
assert(!this.parameterValidation || quotaIsValid, 'Quota must be a strictly positive number');
if (accountName) {
assert(!this.parameterValidation || typeof accountName === 'string', 'the account name, if set, should be a string');
assert(!this.parameterValidation || typeof accountName === 'string',
'the account name, if set, should be a string');
data.AccountName = accountName;
}
this.request('POST', '/', true, callback, data);
Expand All @@ -320,7 +321,8 @@ class VaultClient {
};

if (accountName) {
assert(!this.parameterValidation || typeof accountName === 'string', 'the account name, if set, should be a string');
assert(!this.parameterValidation || typeof accountName === 'string',
'the account name, if set, should be a string');
data.AccountName = accountName;
}
this.request('POST', '/', true, callback, data);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/deleteAccountQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('IAMClient - deleteAccountQuota', () => {
let lastRequestData;

const createClient = parameterValidation => {
client = new IAMClient('127.0.0.1', 8500, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, parameterValidation);
client = new IAMClient('127.0.0.1', 8500, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined, parameterValidation);
lastRequestData = null;
client.request = (method, path, iamAuthenticate, callback, data, reqUid, contentType) => {
lastRequestData = { method, path, iamAuthenticate, data, reqUid, contentType };
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/getAccountQuota.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ describe('GetAccountQuota', () => {
let lastRequestData;

const createClient = parameterValidation => {
client = new IAMClient('127.0.0.1', 8500, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, parameterValidation);
client = new IAMClient('127.0.0.1', 8500, undefined, undefined, undefined,
undefined, undefined, undefined, undefined, undefined, undefined, undefined, parameterValidation);
lastRequestData = null;
client.request = (method, path, iamAuthenticate, callback, data, reqUid, contentType) => {
lastRequestData = { method, path, iamAuthenticate, data, reqUid, contentType };
Expand Down

0 comments on commit 1c6b5ff

Please sign in to comment.