mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Revert test changes and fix original tests
This commit is contained in:
parent
6e1351679b
commit
6f5c0ac2e7
3 changed files with 18 additions and 8 deletions
|
@ -85,9 +85,6 @@ class SSHCommandExecutionError(SSHException, CommandExecutionError):
|
||||||
if self.parsed and "local" in self.parsed:
|
if self.parsed and "local" in self.parsed:
|
||||||
# Wrapped commands that indicate a non-zero retcode
|
# Wrapped commands that indicate a non-zero retcode
|
||||||
return self.parsed["local"]
|
return self.parsed["local"]
|
||||||
elif self.stderr:
|
|
||||||
# Remote executions that indicate a non-zero retcode
|
|
||||||
return self.stderr
|
|
||||||
return super().to_ret()
|
return super().to_ret()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
|
@ -204,6 +204,19 @@ salt/(client/ssh/.+|cli/ssh\.py):
|
||||||
- pytests.integration.ssh.test_raw
|
- pytests.integration.ssh.test_raw
|
||||||
- integration.ssh.test_state
|
- integration.ssh.test_state
|
||||||
- pytests.integration.ssh.test_py_versions
|
- pytests.integration.ssh.test_py_versions
|
||||||
|
- pytests.integration.netapi.test_ssh_client
|
||||||
|
|
||||||
|
salt/client/ssh/wrapper/*:
|
||||||
|
- pytests.integration.ssh.test_deploy
|
||||||
|
- pytests.integration.ssh.test_grains
|
||||||
|
- pytests.integration.ssh.test_mine
|
||||||
|
- pytests.integration.ssh.test_master
|
||||||
|
- pytests.integration.ssh.test_jinja_filters
|
||||||
|
- pytests.integration.ssh.test_pillar
|
||||||
|
- pytests.integration.ssh.test_raw
|
||||||
|
- integration.ssh.test_state
|
||||||
|
- pytests.integration.ssh.test_py_versions
|
||||||
|
- pytests.integration.netapi.test_ssh_client
|
||||||
|
|
||||||
salt/config/*:
|
salt/config/*:
|
||||||
- unit.test_config
|
- unit.test_config
|
||||||
|
@ -309,6 +322,7 @@ salt/utils/vt.py:
|
||||||
- pytests.integration.ssh.test_pillar
|
- pytests.integration.ssh.test_pillar
|
||||||
- pytests.integration.ssh.test_raw
|
- pytests.integration.ssh.test_raw
|
||||||
- integration.ssh.test_state
|
- integration.ssh.test_state
|
||||||
|
- pytests.integration.netapi.test_ssh_client
|
||||||
|
|
||||||
salt/wheel/*:
|
salt/wheel/*:
|
||||||
- pytests.integration.wheel.test_client
|
- pytests.integration.wheel.test_client
|
||||||
|
|
|
@ -161,7 +161,8 @@ def test_shell_inject_ssh_priv(
|
||||||
if ret:
|
if ret:
|
||||||
break
|
break
|
||||||
assert path.exists() is False
|
assert path.exists() is False
|
||||||
assert "Network is unreachable" in ret[tgt]
|
assert not ret[tgt]["stdout"]
|
||||||
|
assert ret[tgt]["stderr"]
|
||||||
|
|
||||||
|
|
||||||
def test_shell_inject_tgt(client, salt_ssh_roster_file, tmp_path, salt_auto_account):
|
def test_shell_inject_tgt(client, salt_ssh_roster_file, tmp_path, salt_auto_account):
|
||||||
|
@ -211,10 +212,8 @@ def test_shell_inject_ssh_options(
|
||||||
}
|
}
|
||||||
ret = client.run(low)
|
ret = client.run(low)
|
||||||
assert path.exists() is False
|
assert path.exists() is False
|
||||||
assert (
|
assert not ret["127.0.0.1"]["stdout"]
|
||||||
"Bad configuration option" in ret["127.0.0.1"]
|
assert ret["127.0.0.1"]["stderr"]
|
||||||
or "no argument after keyword" in ret["127.0.0.1"]
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_shell_inject_ssh_port(
|
def test_shell_inject_ssh_port(
|
||||||
|
|
Loading…
Add table
Reference in a new issue