Skip to content

Commit

Permalink
fixing misconfigured region
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCreator committed Mar 21, 2023
1 parent e23462d commit 75506f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/api/SpaceAndProjectApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ class SpaceAndProjectApi {
* - height
* - dataSetID
* - dataObject
* - region
*
* @param {String} projectID to run test from
* @param {Object} testParams containing the parameters listed above
Expand All @@ -292,6 +293,7 @@ class SpaceAndProjectApi {
let dataSetID = testParams.dataSetID || testParams.environmentId;
let dataObject = testParams.data || testParams.dataObject;
let secretData = testParams.secretData;
let region = testParams.region || null;

// Lets prepare the request object
let reqObj = {
Expand All @@ -305,6 +307,9 @@ class SpaceAndProjectApi {
if( testParams.userAgent != null && testParams.userAgent.length >= 1 ) {
reqObj.userAgent = testParams.userAgent;
}
if( region != null ) {
reqObj.region = region;
}
if( dataSetID != null ) {
reqObj["environmentId"] = dataSetID;
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/cli-command/project/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,8 @@ class TestRunnerSession {
browser: this.browser,
width: this.width,
height: this.height,
// We set both region, and serverRegion for backwards compatibility reasons
// We ensure region is forwarded
region: this.region,
serverRegion: this.region,
// Rest is as per normal
dataSetID: this.dataSetID,
data: this.dataObject,
Expand Down

0 comments on commit 75506f2

Please sign in to comment.