@@ -264,51 +264,56 @@ func TestStartGateway(t *testing.T) {
264
264
expectedStatus : http .StatusNotFound ,
265
265
},
266
266
{
267
- name : "invalid distributor proxy" ,
268
- config : & Config {},
269
- expectedErr : errors .New ("invalid URL scheme:" ),
267
+ name : "invalid distributor proxy" ,
268
+ config : & Config {
269
+ Distributor : Upstream {
270
+ URL : "localhost" ,
271
+ Paths : []string {},
272
+ },
273
+ },
274
+ expectedErr : errors .New ("invalid URL scheme" ),
270
275
},
271
276
{
272
277
name : "invalid frontend proxy" ,
273
278
config : & Config {
274
279
Distributor : Upstream {
275
- URL : distributorServer . URL ,
280
+ URL : "localhost" ,
276
281
Paths : []string {},
277
282
},
278
283
},
279
- expectedErr : errors .New ("invalid URL scheme: " ),
284
+ expectedErr : errors .New ("invalid URL scheme" ),
280
285
},
281
286
{
282
287
name : "invalid alertmanager proxy" ,
283
288
config : & Config {
284
289
Distributor : Upstream {
285
- URL : distributorServer . URL ,
290
+ URL : "localhost" ,
286
291
Paths : []string {},
287
292
},
288
293
QueryFrontend : Upstream {
289
- URL : frontendServer . URL ,
294
+ URL : "localhost" ,
290
295
Paths : []string {},
291
296
},
292
297
},
293
- expectedErr : errors .New ("invalid URL scheme: " ),
298
+ expectedErr : errors .New ("invalid URL scheme" ),
294
299
},
295
300
{
296
301
name : "invalid ruler proxy" ,
297
302
config : & Config {
298
303
Distributor : Upstream {
299
- URL : distributorServer . URL ,
304
+ URL : "localhost" ,
300
305
Paths : []string {},
301
306
},
302
307
QueryFrontend : Upstream {
303
- URL : frontendServer . URL ,
308
+ URL : "localhost" ,
304
309
Paths : []string {},
305
310
},
306
311
Alertmanager : Upstream {
307
- URL : alertmanagerServer . URL ,
312
+ URL : "localhost" ,
308
313
Paths : []string {},
309
314
},
310
315
},
311
- expectedErr : errors .New ("invalid URL scheme: " ),
316
+ expectedErr : errors .New ("invalid URL scheme" ),
312
317
},
313
318
}
314
319
0 commit comments