mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
switch to test.ping for ssh setup tests
This commit is contained in:
parent
41fd39ebf4
commit
c6eb9749a5
1 changed files with 5 additions and 5 deletions
|
@ -156,24 +156,24 @@ def salt_ssh_cli(
|
|||
|
||||
def test_setup(salt_ssh_cli, ssh_container_name, ssh_sub_container_name, ssh_password):
|
||||
"""
|
||||
Test salt-ssh grains id work for localhost.
|
||||
Test salt-ssh setup works
|
||||
"""
|
||||
# Provide the passwd from the CLI to allow the key deploy
|
||||
possible_ids = (ssh_container_name, ssh_sub_container_name)
|
||||
ret = salt_ssh_cli.run(
|
||||
"--passwd", ssh_password, "--key-deploy", "grains.get", "id", minion_tgt="*"
|
||||
"--passwd", ssh_password, "--key-deploy", "test.ping", minion_tgt="*"
|
||||
)
|
||||
assert ret.returncode == 0
|
||||
for id in possible_ids:
|
||||
assert id in ret.data
|
||||
assert ret.data[id] == id
|
||||
assert ret.data[id] is True
|
||||
|
||||
# Run it again without the key deploy
|
||||
ret = salt_ssh_cli.run("grains.get", "id", minion_tgt="*")
|
||||
ret = salt_ssh_cli.run("test.ping", minion_tgt="*")
|
||||
assert ret.returncode == 0
|
||||
for id in possible_ids:
|
||||
assert id in ret.data
|
||||
assert ret.data[id] == id
|
||||
assert ret.data[id] is True
|
||||
|
||||
# Run a test.sleep and kill it
|
||||
sleep_time = 15
|
||||
|
|
Loading…
Add table
Reference in a new issue