From 2814908eb5c08caf65b55f28a6163a8ec482c51a Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sun, 9 Aug 2026 09:06:00 +0000 Subject: [PATCH] test: add coverage for format_sentinel_hosts --- backend/tests/test_valkey_queue.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/tests/test_valkey_queue.py b/backend/tests/test_valkey_queue.py index 7a729368..04ccf961 100644 --- a/backend/tests/test_valkey_queue.py +++ b/backend/tests/test_valkey_queue.py @@ -60,3 +60,12 @@ def test_valkey_queue_rejects_invalid_sentinel_hosts( with pytest.raises(ValueError, match="host:port"): valkey_queue.valkey_queue_config_summary() + +def test_format_sentinel_hosts() -> None: + hosts = [("valkey-a.local", 26379), ("valkey-b.local", 26379)] + result = valkey_queue.format_sentinel_hosts(hosts) + assert result == "valkey-a.local:26379,valkey-b.local:26379" + + empty_hosts: list[tuple[str, int]] = [] + empty_result = valkey_queue.format_sentinel_hosts(empty_hosts) + assert empty_result == ""