Add tests and a changelog

This commit is contained in:
MKLeb 2022-11-17 15:47:49 -05:00 committed by Megan Wilhite
parent 8a647033a8
commit 8a62217866
2 changed files with 10 additions and 0 deletions

1
changelog/60365.fixed Normal file
View file

@ -0,0 +1 @@
Fixed stdout and stderr being empty sometimes when use_vt=True for the cmd.run[*] functions

View file

@ -13,3 +13,12 @@ def test_exec_code_all(salt_call_cli, non_root_account):
"cmd.exec_code_all", "bash", "echo good", runas=non_root_account.username
)
assert ret.returncode == 0
def test_long_stdout(salt_cli, salt_minion):
echo_str = "salt" * 1000
ret = salt_cli.run(
"cmd.run", f"echo {echo_str}", use_vt=True, minion_tgt=salt_minion.id
)
assert ret.returncode == 0
assert len(ret.data.strip()) == len(echo_str)