def test_when_os_found_pids_but_edenDir_not_in_cmdline(self) -> None: proc_utils = self.make_proc_utils() proc_utils.add_process(1614248, ["edenfs"]) proc_utils.add_process(1639164, ["edenfs"]) fixer, out = self.run_check(proc_utils, dry_run=False) self.assertEqual("", out) self.assert_results(fixer, num_problems=0)
def test_when_other_processes_with_similar_names_running(self) -> None: proc_utils = self.make_proc_utils() proc_utils.add_edenfs(475203, "/home/user/.eden") proc_utils.add_process( 575204, ["/foobar/fooedenfs", "--edenDir", "/home/user/.eden", "--edenfs"]) proc_utils.add_process( 675205, ["/foobar/edenfsbar", "--edenDir", "/home/user/.eden", "--edenfs"]) proc_utils.add_process( 775206, ["/foobar/edenfs", "--edenDir", "/home/user/.eden", "--edenfs"]) proc_utils.add_edenfs(775310, "/home/user/.eden", set_lockfile=False) fixer, out = self.run_check(proc_utils, dry_run=False) self.assertEqual( f"""\ <yellow>- Found problem:<reset> Many edenfs processes are running. Please keep only one for each config directory. kill -9 775310 """, out, ) self.assert_results(fixer, num_problems=1, num_manual_fixes=1)