diff --git a/js/modules/k6/http/request_test.go b/js/modules/k6/http/request_test.go index 1091a986e8da..711c886a6bcc 100644 --- a/js/modules/k6/http/request_test.go +++ b/js/modules/k6/http/request_test.go @@ -206,6 +206,11 @@ func TestRequestAndBatch(t *testing.T) { } assert.Equal(t, 10, reqsCount) + assertRequestMetricsEmitted(t, bufSamples, "GET", sr("HTTPBIN_URL/redirect/9"), sr("HTTPBIN_URL/redirect/9"), 302, "") + for i := 8; i > 0; i-- { + url := sr(fmt.Sprintf("HTTPBIN_URL/relative-redirect/%d", i)) + assertRequestMetricsEmitted(t, bufSamples, "GET", url, url, 302, "") + } assertRequestMetricsEmitted(t, bufSamples, "GET", sr("HTTPBIN_URL/get"), sr("HTTPBIN_URL/get"), 200, "") })