Skip to content

Commit 0a55d61

Browse files
Merge pull request #48 from japneetlambdatest/dev
MLE-5511 tunnel-name issue resolved
2 parents 1cdb28d + 701076c commit 0a55d61

File tree

6 files changed

+222
-198
lines changed

6 files changed

+222
-198
lines changed

commands/run.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = function (args) {
6363
user: lt_config["lambdatest_auth"]["username"],
6464
key: lt_config["lambdatest_auth"]["access_key"],
6565
tunnelName:
66-
lt_config["tunnel_settings"]["tunnelName"],
66+
lt_config["tunnel_settings"]["tunnel_name"],
6767
v: true,
6868
env: env,
6969
};
@@ -84,7 +84,9 @@ module.exports = function (args) {
8484
});
8585
})
8686
.catch((error) => {
87-
console.log(error);
87+
console.log(
88+
"Error occured while starting tunnel, check tunnel logs for more info on Error"
89+
);
8890
});
8991
} else {
9092
batch_runner.run_batches(lt_config, batches, env);

commands/utils/constants.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
21
module.exports = {
3-
LOGIN_URL: "/cy/login",
4-
RUN_URL: "/cy/run",
5-
RUN_WS_URL: "/cy/run/ws",
6-
PROJECT_UPLOAD_URL:"/url",
7-
CLI:"/cy/versions",
8-
LT_CONFIG_NAME: "lambdatest-config.json",
9-
CYPRESS_CONFIG_NAME:"cypress.json",
10-
DEFAULT_TEST_PATH: ".",
11-
LAMBDA_CONFIG: "./lambdatest-config.json",
12-
SUPPORTED_CYPRESS_VERSIONS:["5","6"],
13-
BUILD_END_STATES:"&status=running,queued,created,initiated,pqueued",
14-
15-
prod: {
16-
INTEGRATION_BASE_URL: "https://api.lambdatest.com/liis",
17-
BUILD_BASE_URL: "https://api.lambdatest.com/automation/api/v1/builds/",
18-
BUILD_STOP_URL:"https://beta-api.lambdatest.com/api/v1/test/stop?buildId=",
19-
SESSION_URL:"https://api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id="
20-
21-
},
22-
stage: {
23-
INTEGRATION_BASE_URL: "https://stage-api.lambdatest.com/liis",
24-
BUILD_BASE_URL: "https://stage-api.lambdatest.com/automation/api/v1/builds/",
25-
BUILD_STOP_URL:"https://stage-api.lambdatest.com/api/v1/test/stop?buildId=",
26-
SESSION_URL:"https://stage-api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id="
27-
28-
},
29-
beta: {
30-
31-
INTEGRATION_BASE_URL: "https://beta-api.lambdatest.com/liis",
32-
BUILD_BASE_URL: "https://api.lambdatest.com/automation/api/v1/builds/",
33-
BUILD_STOP_URL:"https://beta-api.lambdatest.com/api/v1/test/stop?buildId=",
34-
SESSION_URL:"https://api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id="
2+
LOGIN_URL: "/cy/login",
3+
RUN_URL: "/cy/run",
4+
RUN_WS_URL: "/cy/run/ws",
5+
PROJECT_UPLOAD_URL: "/url",
6+
CLI: "/cy/versions",
7+
LT_CONFIG_NAME: "lambdatest-config.json",
8+
CYPRESS_CONFIG_NAME: "cypress.json",
9+
DEFAULT_TEST_PATH: ".",
10+
LAMBDA_CONFIG: "./lambdatest-config.json",
11+
SUPPORTED_CYPRESS_VERSIONS: ["5", "6"],
12+
BUILD_END_STATES: "&status=running,queued,created,initiated,pqueued",
3513

36-
}
37-
}
14+
prod: {
15+
INTEGRATION_BASE_URL: "https://api.lambdatest.com/liis",
16+
BUILD_BASE_URL: "https://api.lambdatest.com/automation/api/v1/builds/",
17+
BUILD_STOP_URL: "https://beta-api.lambdatest.com/api/v1/test/stop?buildId=",
18+
SESSION_URL:
19+
"https://api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id=",
20+
},
21+
stage: {
22+
INTEGRATION_BASE_URL: "https://api.websocket.dev.lambdatest.io/liis",
23+
BUILD_BASE_URL:
24+
"https://api.websocket.dev.lambdatest.io/automation/api/v1/builds/",
25+
BUILD_STOP_URL:
26+
"https://api.websocket.dev.lambdatest.io/api/v1/test/stop?buildId=",
27+
SESSION_URL:
28+
"https://api.websocket.dev.lambdatest.io/automation/api/v1/sessions?limit=200&session_id=",
29+
},
30+
beta: {
31+
INTEGRATION_BASE_URL: "https://beta-api.lambdatest.com/liis",
32+
BUILD_BASE_URL: "https://api.lambdatest.com/automation/api/v1/builds/",
33+
BUILD_STOP_URL: "https://beta-api.lambdatest.com/api/v1/test/stop?buildId=",
34+
SESSION_URL:
35+
"https://api.lambdatest.com/automation/api/v1/sessions?limit=200&session_id=",
36+
},
37+
};

commands/utils/default_config.js

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
1-
module.exports={
2-
"lambdatest_auth": {
3-
"username": "<Your LambdaTest username>",
4-
"access_key": "<Your LambdaTest access key>"
1+
module.exports = {
2+
lambdatest_auth: {
3+
username: "<Your LambdaTest username>",
4+
access_key: "<Your LambdaTest access key>",
5+
},
6+
browsers: [
7+
{
8+
browser: "Chrome",
9+
platform: "Windows 10",
10+
versions: ["86.0"],
511
},
6-
"browsers": [
7-
{
8-
"browser": "Chrome",
9-
"platform": "Windows 10",
10-
"versions": [
11-
"86.0"
12-
]
13-
},
14-
{
15-
"browser": "Firefox",
16-
"platform": "Windows 10",
17-
"versions": [
18-
"82.0"
19-
]
20-
}
21-
],
22-
"run_settings": {
23-
"cypress_config_file": "cypress.json",
24-
"build_name": "build-name",
25-
"parallels": 1,
26-
"specs":"./*.spec.js",
27-
"ignore_files":"",
28-
"feature_file_suppport": false,
29-
"network": false,
30-
},
31-
"tunnel_settings": {
32-
"tunnel": false,
33-
"tunnelName": null
34-
35-
}
36-
}
12+
{
13+
browser: "Firefox",
14+
platform: "Windows 10",
15+
versions: ["82.0"],
16+
},
17+
],
18+
run_settings: {
19+
cypress_config_file: "cypress.json",
20+
build_name: "build-name",
21+
parallels: 1,
22+
specs: "./*.spec.js",
23+
ignore_files: "",
24+
feature_file_suppport: false,
25+
network: false,
26+
},
27+
tunnel_settings: {
28+
tunnel: false,
29+
tunnel_name: null,
30+
},
31+
};

commands/utils/poller/build_stats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function get_completed_build_info(lt_config, session_id, env) {
3030
}
3131

3232
function get_build_info(lt_config, session_id, env, update_status, callback) {
33-
3433
request(
3534
constants[env].SESSION_URL + session_id + constants.BUILD_END_STATES,
3635
{
@@ -43,6 +42,7 @@ function get_build_info(lt_config, session_id, env, update_status, callback) {
4342
if (err) {
4443
//reject(err);
4544
update_status(false);
45+
console.log(err);
4646
return callback("Error occured while checking build status");
4747
}
4848
if (res.statusCode == "401") {

commands/utils/set_args.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,16 @@ function sync_args_from_cmd(args) {
175175
lt_config["tunnel_settings"]["tunnel"] = false;
176176
}
177177

178-
if ("tunnelName" in args) {
178+
if ("tunnel_name" in args) {
179179
if (!("tunnel_settings" in lt_config)) {
180180
lt_config["tunnel_settings"] = {};
181181
}
182-
lt_config["tunnel_settings"]["tunnelName"] = args["tunnelName"];
182+
lt_config["tunnel_settings"]["tunnel_name"] = args["tunnel_name"];
183183
} else if (!("tunnel_settings" in lt_config)) {
184184
lt_config["tunnel_settings"] = {};
185-
lt_config["tunnel_settings"]["tunnelName"] = "";
186-
} else if (!("tunnelName" in lt_config["tunnel_settings"])) {
187-
lt_config["tunnel_settings"]["tunnelName"] = "";
185+
lt_config["tunnel_settings"]["tunnel_name"] = "";
186+
} else if (!("tunnel_name" in lt_config["tunnel_settings"])) {
187+
lt_config["tunnel_settings"]["tunnel_name"] = "";
188188
}
189189

190190
//add browsers from cli

0 commit comments

Comments
 (0)