status.pid
(self)
| 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 |
nothing calls this directly
no test coverage detected