Skip to content

Commit

Permalink
Add client connection file to connection parameters, configure logs o…
Browse files Browse the repository at this point in the history
…utput file, tests for node logger
  • Loading branch information
sfc-gh-knozderko committed Sep 28, 2023
1 parent 7de8baa commit 4e81909
Show file tree
Hide file tree
Showing 9 changed files with 585 additions and 274 deletions.
15 changes: 15 additions & 0 deletions lib/connection/connection_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo)
ErrorCodes.ERR_CONN_CREATE_INVALID_GCS_USE_DOWNSCOPED_CREDENTIAL);
}

var clientConfigFile = options.clientConfigFile;
if (Util.exists(clientConfigFile)) {
Errors.checkArgumentValid(Util.isString(clientConfigFile), ErrorCodes.ERR_CONN_CREATE_INVALID_CLIENT_CONFIG_FILE);
}

// remember if we're in qa mode
this._qaMode = qaMode;

Expand Down Expand Up @@ -747,6 +752,15 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo)
return forceStageBindError;
};

/**
* Returns the client config file
*
* @returns {String}
*/
this.getClientConfigFile = function () {
return clientConfigFile;
};

// save config options
this.username = options.username;
this.password = options.password;
Expand All @@ -758,6 +772,7 @@ function ConnectionConfig(options, validateCredentials, qaMode, clientInfo)
this.masterToken = options.masterToken;
this.masterTokenExpirationTime = options.masterTokenExpirationTime;
this.sessionTokenExpirationTime = options.sessionTokenExpirationTime;
this.clientConfigFile = options.clientConfigFile;

// create the parameters array
var parameters = createParameters();
Expand Down
1 change: 1 addition & 0 deletions lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ codes.ERR_CONN_CREATE_INVALID_ARRAY_BINDING_THRESHOLD = 404037;
codes.ERR_CONN_CREATE_INVALID_GCS_USE_DOWNSCOPED_CREDENTIAL = 404038;
codes.ERR_CONN_CREATE_INVALID_FORCE_STAGE_BIND_ERROR = 404039;
codes.ERR_CONN_CREATE_INVALID_BROWSER_TIMEOUT = 404040;
codes.ERR_CONN_CREATE_INVALID_CLIENT_CONFIG_FILE = 404041;

// 405001
codes.ERR_CONN_CONNECT_INVALID_CALLBACK = 405001;
Expand Down
Loading

0 comments on commit 4e81909

Please sign in to comment.