We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent08d6b04 commit6b4619eCopy full SHA for 6b4619e
testgres/operations/remote_ops.py
@@ -50,8 +50,8 @@ def __init__(self, conn_params: ConnectionParams):
50
else:
51
self.ssh_cmd= []
52
self.remote=True
53
-self.username=conn_params.usernameorself.get_user()
54
-self.ssh_dest=f"{self.username}@{self.host}"ifself.usernameelse"{self.host}"
+self.username=conn_params.username
+self.ssh_dest=f"{self.username}@{self.host}"ifself.usernameelseself.host
55
self.add_known_host(self.host)
56
self.tunnel_process=None
57
@@ -173,10 +173,6 @@ def set_env(self, var_name: str, var_val: str):
173
"""
174
returnself.exec_command("export {}={}".format(var_name,var_val))
175
176
-# Get environment variables
177
-defget_user(self):
178
-returnself.exec_command("echo $USER",encoding=get_default_encoding()).strip()
179
-
180
defget_name(self):
181
cmd='python3 -c "import os; print(os.name)"'
182
returnself.exec_command(cmd,encoding=get_default_encoding()).strip()