Just confirm that the expected error messages is in stderr

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-06-27 22:13:37 +01:00 committed by Pedro Algarvio
parent 57e0156e64
commit b6a9599a70

View file

@ -108,7 +108,7 @@ def test_retcode_exe_run_fail(salt_ssh_cli):
ret = salt_ssh_cli.run("file.touch", "/tmp/non/ex/is/tent")
assert ret.returncode == EX_AGGREGATE
assert isinstance(ret.data, dict)
assert ret.data["stderr"] == "Error running 'file.touch': No such file or directory"
assert "Error running 'file.touch': No such file or directory" in ret.data["stderr"]
assert ret.data["retcode"] == 1