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 ca05930
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,9 @@ 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 ca05930

Please sign in to comment.