File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ func TestSMK6(t *testing.T) {
156
156
"error" : {"probe_http_info" },
157
157
"expected_response" : {"probe_http_got_expected_response" },
158
158
"group" : {},
159
+ "__raw_url__" : {},
159
160
}
160
161
161
162
for _ , mf := range mfs {
@@ -319,6 +320,12 @@ func TestSMK6(t *testing.T) {
319
320
metricLabels : map [string ]string {"tls_version" : "1.3" , "url" : "https://test-api.k6.io/public/crocodiles/" },
320
321
assertValue : any , // Just fail if not present.
321
322
},
323
+ {
324
+ name : "__raw_url__ overrides url" ,
325
+ metricName : "probe_http_requests_total" ,
326
+ metricLabels : map [string ]string {"url" : "foobar" },
327
+ assertValue : equals (1 ),
328
+ },
322
329
} {
323
330
tc := tc
324
331
t .Run (tc .name , func (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ export default function () {
39
39
http . get ( `http://${ testHost } ` ) ; // non-https.
40
40
http . get ( `https://${ testHost } /public/crocodiles/` ) ;
41
41
http . get ( `https://${ testHost } /public/crocodiles2/` ) ; // 404
42
- http . get ( `https://${ testHost } /public/crocodiles3/` ) ; // 404
42
+ http . get ( `https://${ testHost } /public/crocodiles3/` , {
43
+ tags : {
44
+ '__raw_url__' : 'foobar' ,
45
+ }
46
+ } ) ; // 404
43
47
http . get ( `https://${ testHost } /public/crocodiles4/` ) ; // 404
44
48
http . get ( `https://${ testHost } /public/crocodiles4/` ) ; // Second 404, to assert differences between failure rate and counter.
45
49
http . get ( `http://fail.internal/public/crocodiles4/` ) ; // failed
You can’t perform that action at this time.
0 commit comments