Skip to content

Commit

Permalink
Add tests for unix socket with relative path
Browse files Browse the repository at this point in the history
Signed-off-by: Salvatore Mesoraca <[email protected]>
  • Loading branch information
aiven-sal committed Dec 13, 2024
1 parent 65b5c04 commit bca3f0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bca3f0d

Please sign in to comment.