Skip to content

Commit c431096

Browse files
s: move to netip addr
1 parent e0e5f01 commit c431096

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: pkg/service/repair/helper_integration_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func parseRepairAsyncReq(t *testing.T, req *http.Request) repairReq {
207207
}
208208

209209
sched := repairReq{
210-
host: netip.MustParseAddr(req.Host),
210+
host: netip.MustParseAddr(req.URL.Hostname()),
211211
keyspace: strings.TrimPrefix(req.URL.Path, repairAsyncEndpoint+"/"),
212212
table: req.URL.Query().Get("columnFamilies"),
213213
replicaSet: util2.ConvertSlice(strings.Split(req.URL.Query().Get("hosts"), ","), netip.MustParseAddr),
@@ -237,7 +237,7 @@ func parseTabletRepairReq(t *testing.T, req *http.Request) repairReq {
237237
}
238238

239239
sched := repairReq{
240-
host: netip.MustParseAddr(req.Host),
240+
host: netip.MustParseAddr(req.URL.Hostname()),
241241
keyspace: req.URL.Query().Get("ks"),
242242
table: req.URL.Query().Get("table"),
243243
dcFilter: strings.Split(req.URL.Query().Get("dcs_filter"), ","),
@@ -270,7 +270,7 @@ func parseRepairAsyncStatusReq(t *testing.T, req *http.Request) repairStatusReq
270270
}
271271

272272
status := repairStatusReq{
273-
host: netip.MustParseAddr(req.Host),
273+
host: netip.MustParseAddr(req.URL.Hostname()),
274274
id: req.URL.Query().Get("id"),
275275
}
276276
if status.id == "" {
@@ -288,7 +288,7 @@ func parseTabletRepairStatusReq(t *testing.T, req *http.Request) repairStatusReq
288288
}
289289

290290
status := repairStatusReq{
291-
host: netip.MustParseAddr(req.Host),
291+
host: netip.MustParseAddr(req.URL.Hostname()),
292292
id: strings.TrimPrefix(req.URL.Path, waitTaskEndpoint+"/"),
293293
}
294294
if status.id == "" {

0 commit comments

Comments
 (0)