Skip to content

Commit

Permalink
Show files, debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed Sep 30, 2024
1 parent 5591382 commit a75af40
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/pytests/pkg/downgrade/test_salt_downgrade.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import time

import os
import packaging.version
import psutil
import pytest
Expand All @@ -20,6 +21,8 @@ def _get_running_named_salt_pid(process_name):
for proc in psutil.process_iter():
try:
cmdl_strg = " ".join(str(element) for element in proc.cmdline())
print(f"{proc.name}: {proc.pid}")
print(cmdl_strg)
except (psutil.ZombieProcess, psutil.NoSuchProcess, psutil.AccessDenied):
continue
if process_name in cmdl_strg:
Expand Down Expand Up @@ -95,6 +98,8 @@ def test_salt_downgrade_minion(salt_call_cli, install_salt):
else:
time.sleep(60)

files = os.path.walk(install_salt.install_dir)

# Verify there is a new running minion by getting its PID and comparing it
# with the PID from before the upgrade
new_minion_pids = _get_running_named_salt_pid(process_name)
Expand Down

0 comments on commit a75af40

Please sign in to comment.