@@ -1076,7 +1076,7 @@ def test_resolve_hostname_with_port(self, monkeypatch):
10761076 """Test resolving hostname to IP when endpoint has a port."""
10771077 monkeypatch .setattr ("socket.gethostbyname" , lambda hostname : "10.1.2.3" )
10781078
1079- result = _resolve_endpoint_hostname ("http://:9020" )
1079+ result = _resolve_endpoint_hostname ("http://grid :9020" )
10801080
10811081 assert result == "http://10.1.2.3:9020"
10821082
@@ -1108,7 +1108,7 @@ def test_resolve_hostname_with_path(self, monkeypatch):
11081108 """Test that paths are preserved in the resolved URL."""
11091109 monkeypatch .setattr ("socket.gethostbyname" , lambda hostname : "10.1.2.3" )
11101110
1111- result = _resolve_endpoint_hostname ("http://:9020/some/path" )
1111+ result = _resolve_endpoint_hostname ("http://grid :9020/some/path" )
11121112
11131113 assert result == "http://10.1.2.3:9020/some/path"
11141114
@@ -1157,9 +1157,9 @@ def capture_gethostbyname(hostname):
11571157
11581158 monkeypatch .setattr ("socket.gethostbyname" , capture_gethostbyname )
11591159
1160- _resolve_endpoint_hostname ("http://:9020" )
1160+ _resolve_endpoint_hostname ("http://grid :9020" )
11611161
1162- assert captured_hostname ["value" ] == ""
1162+ assert captured_hostname ["value" ] == "grid "
11631163
11641164 def test_storage_options_resolution_failure_keeps_original (self , monkeypatch , caplog ):
11651165 """Test that DNS resolution failure in _storage_options_for keeps the original endpoint."""
@@ -1190,11 +1190,11 @@ def failing_gethostbyname(hostname):
11901190 monkeypatch .setattr ("boto3.Session" , FakeSession )
11911191 monkeypatch .setattr ("polars_io_tools.io_sources.util.pl.CredentialProviderAWS" , FakeCredentialProvider , raising = False )
11921192 monkeypatch .setattr ("socket.gethostbyname" , failing_gethostbyname )
1193- monkeypatch .setenv ("AWS_ENDPOINT_URL" , "http://:9020" )
1193+ monkeypatch .setenv ("AWS_ENDPOINT_URL" , "http://grid :9020" )
11941194
11951195 opts = _storage_options_for ("s3://bucket/path" )
11961196
11971197 # Endpoint should be kept as original due to resolution failure
1198- assert opts .pyarrow ["endpoint_override" ] == "http://:9020"
1199- assert opts .polars ["endpoint_url" ] == "http://:9020"
1198+ assert opts .pyarrow ["endpoint_override" ] == "http://grid :9020"
1199+ assert opts .polars ["endpoint_url" ] == "http://grid :9020"
12001200 assert "Failed to resolve hostname" in caplog .text
0 commit comments