diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index e8d01de3e5a6a5943472778453d3be28f758f18c..b8cb73cb443da1e238617763f3ca87583906fe57 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 6fd7237b339dc1d2eeeee1d1f5965ec77d03b53d..6b6487918cd863dfc0d7a07027276c04c94f3617 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: