From bca3f0d6e45acca20ee607abe49d5478e0842d15 Mon Sep 17 00:00:00 2001 From: Salvatore Mesoraca Date: Fri, 13 Dec 2024 18:03:51 +0100 Subject: [PATCH] Add tests for unix socket with relative path Signed-off-by: Salvatore Mesoraca --- tests/test_connection.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_connection.py b/tests/test_connection.py index 545a7d3f..ed554efb 100644 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -341,3 +341,10 @@ def test_unix_socket_connection_failure(): str(e.value) == "Error 2 connecting to unix:///tmp/a.sock. No such file or directory." ) + + +def test_parsing_unix_socket_relative_path(): + parsed = parse_url("unix:./valkey.sock", False) + assert parsed['path'] == './valkey.sock' + assert parsed['connection_class'] is UnixDomainSocketConnection + assert len(parsed) == 2