From 6e59f7c4ee8d067209d8541a9f5bf391b5405bbe Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Mon, 30 May 2022 10:38:29 +0800 Subject: [PATCH] fix(os): config remote server info --- tests/pytest/util/dnodes.py | 9 +++++++-- tests/system-test/test.py | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index e8d01de3e5..b8cb73cb44 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -169,8 +169,13 @@ class TDDnode: self.cfgDict.update({option: value}) def remoteExec(self, updateCfgDict, execCmd): - remote_conn = Connection(self.remoteIP, port=22, user='root', connect_kwargs={'password':'123456'}) - remote_top_dir = '~/test' + try: + config = eval(self.remoteIP) + remote_conn = Connection(host=config["host"], port=config["port"], user=config["user"], connect_kwargs={'password':config["password"]}) + remote_top_dir = config["path"] + except Exception as r: + remote_conn = Connection(host=self.remoteIP, port=22, user='root', connect_kwargs={'password':'123456'}) + remote_top_dir = '~/test' valgrindStr = '' if (self.valgrind==1): valgrindStr = '-g' diff --git a/tests/system-test/test.py b/tests/system-test/test.py index 6fd7237b33..6b6487918c 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -145,7 +145,11 @@ if __name__ == "__main__": if masterIp == "": host = '127.0.0.1' else: - host = masterIp + try: + config = eval(masterIp) + host = config["host"] + except Exception as r: + host = masterIp tdLog.info("Procedures for tdengine deployed in %s" % (host)) if windows: -- GitLab