MCPcopy
hub / github.com/saltstack/salt / test_status_pid

Method test_status_pid

tests/integration/modules/test_status.py:16–31  ·  view source on GitHub ↗

status.pid

(self)

Source from the content-addressed store, hash-verified

14 @pytest.mark.flaky(max_runs=4)
15 @pytest.mark.slow_test
16 def test_status_pid(self):
17 """
18 status.pid
19 """
20 status_pid_out = self.run_function("status.pid", ["salt"])
21 status_pids = set(status_pid_out.split())
22 self.assertTrue(status_pids, "No PIDs matching 'salt' found by status.pid")
23
24 grep_salt_out = self.run_function("cmd.run", ["pgrep -f salt"])
25 grep_pids = set(grep_salt_out.split())
26
27 # Check for intersection. At least some PIDs should still exist.
28 self.assertTrue(
29 status_pids.intersection(grep_pids),
30 f"No overlap between status.pid ({status_pids}) and pgrep ({grep_pids})",
31 )
32
33 @pytest.mark.skip_unless_on_windows
34 @pytest.mark.slow_test

Callers

nothing calls this directly

Calls 2

setFunction · 0.50
run_functionMethod · 0.45

Tested by

no test coverage detected