Fixes salt-ssh authentication when using tty

This commit is contained in:
Megan Wilhite 2020-11-13 17:21:02 -05:00 committed by Daniel Wozniak
parent c9c635cf55
commit b2a6715901
3 changed files with 13 additions and 3 deletions

1
changelog/58922.fixed Normal file
View file

@ -0,0 +1 @@
Fixes salt-ssh authentication when using tty

View file

@ -1378,9 +1378,7 @@ ARGS = {arguments}\n'''.format(
except OSError:
pass
ret = self.execute_script(
script=target_shim_file, extension=extension, pre_dir="$HOME/"
)
ret = self.execute_script(script=target_shim_file, extension=extension)
return ret

View file

@ -38,6 +38,7 @@ class SSHTest(SSHCase):
os.path.exists(os.path.join(thin_dir, "salt-call"))
os.path.exists(os.path.join(thin_dir, "running_data"))
@slowTest
def test_set_path(self):
"""
test setting the path env variable
@ -49,3 +50,13 @@ class SSHTest(SSHCase):
)
ret = self.run_function("environ.get", ["PATH"], roster_file=roster)
assert path in ret
@slowTest
def test_tty(self):
"""
test using tty
"""
roster = os.path.join(RUNTIME_VARS.TMP, "roster-tty")
self.custom_roster(roster, data={"tty": True})
ret = self.run_function("test.ping", roster_file=roster)
assert ret is True