diff options
author | Devaev Maxim <[email protected]> | 2019-04-10 21:40:34 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2019-04-10 21:40:34 +0300 |
commit | 07c59485fcef43a8a3dc122d05c7352a3da8aa15 (patch) | |
tree | ed03ed4c9a314f1be301f90cc5bba64eff4ecbc7 /tests/test_app_cleanup.py | |
parent | 4eb89c9399d3bd440577d275a9c07578c2f47484 (diff) |
moar validators
Diffstat (limited to 'tests/test_app_cleanup.py')
-rw-r--r-- | tests/test_app_cleanup.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_app_cleanup.py b/tests/test_app_cleanup.py index d0f1f009..3e2e4c72 100644 --- a/tests/test_app_cleanup.py +++ b/tests/test_app_cleanup.py @@ -35,7 +35,8 @@ from kvmd.apps.cleanup import main def test_ok(tmpdir) -> None: # type: ignore queue: multiprocessing.queues.Queue = multiprocessing.Queue() - ustreamer_fake_name = "ustr-" + secrets.token_hex(3) + ustreamer_tmp_path = os.path.abspath(str(tmpdir.join("ustr-" + secrets.token_hex(3)))) + os.symlink("/usr/bin/ustreamer", ustreamer_tmp_path) ustreamer_sock_path = os.path.abspath(str(tmpdir.join("ustreamer-fake.sock"))) open(ustreamer_sock_path, "w").close() @@ -43,7 +44,7 @@ def test_ok(tmpdir) -> None: # type: ignore open(kvmd_sock_path, "w").close() def ustreamer_fake() -> None: - setproctitle.setproctitle(ustreamer_fake_name) + setproctitle.setproctitle(os.path.basename(ustreamer_tmp_path)) queue.put(True) while True: time.sleep(1) @@ -60,7 +61,7 @@ def test_ok(tmpdir) -> None: # type: ignore "kvmd/server/unix=" + kvmd_sock_path, "kvmd/streamer/port=0", "kvmd/streamer/unix=" + ustreamer_sock_path, - "kvmd/streamer/cmd=[\"%s\"]" % (ustreamer_fake_name), + "kvmd/streamer/cmd=" + ustreamer_tmp_path, ]) assert not os.path.exists(ustreamer_sock_path) |