summaryrefslogtreecommitdiff
path: root/testenv
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-07 00:55:55 +0200
committerMaxim Devaev <[email protected]>2023-03-07 00:55:55 +0200
commit9ecb7fb94d629919f71f4fd58e3502f041f1b7d9 (patch)
treeed6ee5a1a2d29a8043f42f5cbfe6459a80a4cd3e /testenv
parent49a1beab37741d53a1c37f2b5c9124788fe0b3f0 (diff)
don't remove sockets in kvmd.apps.cleanup
Diffstat (limited to 'testenv')
-rw-r--r--testenv/tests/apps/cleanup/test_main.py19
1 files changed, 2 insertions, 17 deletions
diff --git a/testenv/tests/apps/cleanup/test_main.py b/testenv/tests/apps/cleanup/test_main.py
index 60f4b400..70581a2b 100644
--- a/testenv/tests/apps/cleanup/test_main.py
+++ b/testenv/tests/apps/cleanup/test_main.py
@@ -20,7 +20,6 @@
# ========================================================================== #
-import os
import multiprocessing
import time
@@ -32,15 +31,10 @@ from kvmd.apps.cleanup import main
# =====
-def test_ok(tmpdir) -> None: # type: ignore
+def test_ok() -> None:
_ = Literal # Makes liters happy
queue: "multiprocessing.Queue[Literal[True]]" = multiprocessing.Queue()
- ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock")))
- open(ustreamer_sock_path, "w").close() # pylint: disable=consider-using-with
- kvmd_sock_path = os.path.abspath(str(tmpdir.join("kvmd-fake.sock")))
- open(kvmd_sock_path, "w").close() # pylint: disable=consider-using-with
-
def ustreamer_fake() -> None:
setproctitle.setproctitle("kvmd/streamer: /usr/bin/ustreamer")
queue.put(True)
@@ -52,16 +46,7 @@ def test_ok(tmpdir) -> None: # type: ignore
assert queue.get(timeout=5)
assert proc.is_alive()
- main([
- "kvmd-cleanup",
- "--set-options",
- f"kvmd/server/unix={kvmd_sock_path}",
- f"kvmd/streamer/unix={ustreamer_sock_path}",
- "--run",
- ])
-
- assert not os.path.exists(ustreamer_sock_path)
- assert not os.path.exists(kvmd_sock_path)
+ main(["kvmd-cleanup", "--run"])
assert not proc.is_alive()
proc.join()