diff --git a/scripts/check_server/app.js b/scripts/check_server/app.js index 69e2979..c503519 100644 --- a/scripts/check_server/app.js +++ b/scripts/check_server/app.js @@ -7,9 +7,9 @@ const urls = { 'gamelog': 'https://gamelog-z2-test.cebg.games', 'mail': 'https://gamemail-z2-test.cebg.games', 'game2006api': 'https://game2006api-z2-test.cebg.games', - 'relation': 'wss://relation-test.kingsome.cn/friend/websocket', + 'relation': 'ws://relation-z2-test.cebg.games/friend/websocket', 'game2006': 'ws://game2006-z2-test.cebg.games', - 'game2006-n1': 'wss://game2006-n1-z2-test.cebg.games', + 'game2006-n1': 'ws://game2006-n1-z2-test.cebg.games', }; async function start() { diff --git a/scripts/check_server/testcase.js b/scripts/check_server/testcase.js index 64273ab..d424b88 100644 --- a/scripts/check_server/testcase.js +++ b/scripts/check_server/testcase.js @@ -10,7 +10,7 @@ function httpGet(url, params) { axios({ method: 'get', url: url, - timeout: 1000 * 10, + timeout: 1000 * 3, params: params, responseType: 'text' }).then((response) => { @@ -50,6 +50,8 @@ class TestCase { await this.step6(); await this.step7(); await this.step8(); + await this.step9(); + await this.step10(); } async step1() { @@ -64,8 +66,7 @@ class TestCase { 'openid': '123456' }); this.loginData = response; - console.log('login auth@Login'); - console.log(response); + console.log('login auth@Login', String(err), response); } async step2() { @@ -75,8 +76,7 @@ class TestCase { 'c': 'Ops', 'a': 'selfChecking', }); - console.log('cloud selfChecking@Ops'); - console.log(response); + console.log('cloud selfChecking@Ops', String(err), response); } async step3() { @@ -86,8 +86,7 @@ class TestCase { 'c': 'Ops', 'a': 'selfChecking', }); - console.log('service selfChecking@Ops'); - console.log(response); + console.log('service selfChecking@Ops', String(err), response); } async step4() { @@ -97,8 +96,7 @@ class TestCase { 'c': 'Ops', 'a': 'selfChecking', }); - console.log('gamelog selfChecking@Ops'); - console.log(response); + console.log('gamelog selfChecking@Ops', String(err), response); } async step5() { @@ -108,8 +106,7 @@ class TestCase { 'c': 'Ops', 'a': 'selfChecking', }); - console.log('mail selfChecking@Ops'); - console.log(response); + console.log('mail selfChecking@Ops', String(err), response); } async step6() { @@ -119,8 +116,7 @@ class TestCase { 'c': 'Ops', 'a': 'selfChecking', }); - console.log('game2006api selfChecking@Ops'); - console.log(response); + console.log('game2006api selfChecking@Ops', String(err), response); } async step7() { @@ -153,6 +149,30 @@ class TestCase { }); } + async step9() { + const {err, response} = await httpGet( + this.urls['game2006'].replace('wss://', 'https://'). + replace('ws://', 'https://') + + '/webapp/index.php', + { + 'c': 'Ops', + 'a': 'getNodeId', + }); + console.log('game2006 getNodeId@Ops', String(err), response); + } + + async step10() { + const {err, response} = await httpGet( + this.urls['game2006-n1'].replace('wss://', 'https://'). + replace('ws://', 'https://') + + '/webapp/index.php', + { + 'c': 'Ops', + 'a': 'getNodeId', + }); + console.log('game2006-n1 getNodeId@Ops', String(err), response); + } + } module.exports = TestCase;