Skip to content

Commit

Permalink
Further debug tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 committed Aug 23, 2024
1 parent b54300f commit 55fa71e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/common/salt-api.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Description=The Salt API
Documentation=man:salt-api(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltproject.io/en/latest/contents.html
After=network.target
PartOf=salt-master.service
# DGM PartOf=salt-master.service

[Service]
Type=notify
Expand Down
5 changes: 4 additions & 1 deletion tests/pytests/pkg/integration/test_salt_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ def test_salt_user_master(salt_master, install_salt):
else:
time.sleep(2)

print(f"DGM test_salt_user_master, salt_master '{salt_master}'", flush=True)
print(
f"DGM test_salt_user_master, salt_master '{salt_master}' and is_running '{salt_master.is_running()}'",
flush=True,
)
assert salt_master.is_running()

match = False
Expand Down
24 changes: 22 additions & 2 deletions tests/pytests/pkg/integration/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_salt_versions_report_master(install_salt):


@pytest.mark.skip_on_windows
def test_salt_versions_report_minion(salt_cli, salt_call_cli, salt_minion):
def test_salt_versions_report_minion(salt_cli, salt_call_cli, salt_minion, salt_master):
"""
Test running test.versions_report on minion
"""
Expand All @@ -66,13 +66,33 @@ def test_salt_versions_report_minion(salt_cli, salt_call_cli, salt_minion):
else:
time.sleep(2)

print(f"DGM test_salt_user_mnion, salt_minion '{salt_minion}'", flush=True)
print(
f"DGM test_salt_user_minion, salt_minion '{salt_minion}' and is_running '{salt_minion.is_running()}'",
flush=True,
)
assert salt_minion.is_running()

# DGM
# Make sure the master is running
for count in range(0, 30):
if salt_master.is_running():
break
else:
time.sleep(2)

print(
f"DGM test_salt_user_minion, salt_master '{salt_master}' and is_running '{salt_master.is_running()}'",
flush=True,
)
assert salt_master.is_running()
# DGM

# Make sure we can ping the minion ...
ret = salt_cli.run(
"--timeout=300", "test.ping", minion_tgt=salt_minion.id, _timeout=300
)
print(f"DGM test_salt_user_minion, test.ping ret '{ret}'", flush=True)

assert ret.returncode == 0
assert ret.data is True
ret = salt_cli.run(
Expand Down

0 comments on commit 55fa71e

Please sign in to comment.