treat all localhost endpoints as local setup with same port (#18784)

fixes #18783 and avoids user mistakes
This commit is contained in:
Harshavardhana
2024-01-12 23:53:03 -08:00
committed by GitHub
parent b2b26d9c95
commit 993d96feef
2 changed files with 62 additions and 40 deletions

View File

@@ -258,7 +258,7 @@ func TestCreateEndpoints(t *testing.T) {
Endpoint{URL: &url.URL{Scheme: "http", Host: "localhost:9000", Path: "/d2"}, IsLocal: true},
Endpoint{URL: &url.URL{Scheme: "http", Host: "localhost:9000", Path: "/d3"}, IsLocal: true},
Endpoint{URL: &url.URL{Scheme: "http", Host: "localhost:9000", Path: "/d4"}, IsLocal: true},
}, DistErasureSetupType, nil},
}, ErasureSetupType, nil},
// DistErasure Setup with URLEndpointType having mixed naming to local host.
{"127.0.0.1:10000", []string{"http://localhost/d1", "http://localhost/d2", "http://127.0.0.1/d3", "http://127.0.0.1/d4"}, "", Endpoints{}, -1, fmt.Errorf("all local endpoints should not have different hostnames/ips")},