Skip to content

Commit

Permalink
Remove middleware-specific wrap() call, since this is no longer middl…
Browse files Browse the repository at this point in the history
…eware
  • Loading branch information
paul1r committed Sep 27, 2024
1 parent 92c756d commit a5cf36a
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions pkg/querier/queryrange/detected_fields_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1028,10 +1028,7 @@ func TestQuerier_DetectedFields(t *testing.T) {
limitedHandler(mockLogfmtStreamWithLabels(1, 5, `{type="test", name="foo"}`)),
logHandler(mockLogfmtStreamWithLabels(1, 5, `{type="test", name="foo"}`)),
limits,
).Wrap(base.HandlerFunc(func(_ context.Context, _ base.Request) (base.Response, error) {
t.Fatal("should not be called")
return nil, nil
}))
)

detectedFields := handleRequest(handler, request)
// log lines come from querier_mock_test.go
Expand All @@ -1058,10 +1055,7 @@ func TestQuerier_DetectedFields(t *testing.T) {
limitedHandler(mockLogfmtStreamWithLabelsAndStructuredMetadata(1, 5, `{type="test", name="bob"}`)),
logHandler(mockLogfmtStreamWithLabelsAndStructuredMetadata(1, 5, `{type="test", name="bob"}`)),
limits,
).Wrap(base.HandlerFunc(func(_ context.Context, _ base.Request) (base.Response, error) {
t.Fatal("should not be called")
return nil, nil
}))
)

detectedFields := handleRequest(handler, request)
// log lines come from querier_mock_test.go
Expand Down Expand Up @@ -1090,10 +1084,7 @@ func TestQuerier_DetectedFields(t *testing.T) {
limitedHandler(mockLogfmtStreamWithLabels(1, 2, `{type="test", name="foo"}`)),
logHandler(mockLogfmtStreamWithLabels(1, 2, `{type="test", name="foo"}`)),
limits,
).Wrap(base.HandlerFunc(func(_ context.Context, _ base.Request) (base.Response, error) {
t.Fatal("should not be called")
return nil, nil
}))
)

detectedFields := handleRequest(handler, request)
// log lines come from querier_mock_test.go
Expand Down Expand Up @@ -1136,10 +1127,7 @@ func TestQuerier_DetectedFields(t *testing.T) {
),
logHandler(mockLogfmtStreamWithLabelsAndStructuredMetadata(1, 2, `{type="test"}`)),
limits,
).Wrap(base.HandlerFunc(func(_ context.Context, _ base.Request) (base.Response, error) {
t.Fatal("should not be called")
return nil, nil
}))
)

detectedFields := handleRequest(handler, request)
// log lines come from querier_mock_test.go
Expand Down Expand Up @@ -1188,10 +1176,7 @@ func TestQuerier_DetectedFields(t *testing.T) {
),
logHandler(mockLogfmtStreamWithLabelsAndStructuredMetadata(1, 2, `{type="test", name="bob"}`)),
limits,
).Wrap(base.HandlerFunc(func(_ context.Context, _ base.Request) (base.Response, error) {
t.Fatal("should not be called")
return nil, nil
}))
)

detectedFields := handleRequest(handler, request)
// log lines come from querier_mock_test.go
Expand Down

0 comments on commit a5cf36a

Please sign in to comment.