Skip to content

Commit

Permalink
Fixing a failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Nikolic <durica.nikolic@grafana.com>
  • Loading branch information
duricanikolic committed Jun 12, 2024
1 parent 644f28f commit de681cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/distributor/distributor_ingest_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ func TestDistributor_Push_ShouldReturnErrorMappedTo4xxStatusCodeIfWriteRequestCo
limits := prepareDefaultLimits()
limits.MaxLabelValueLength = hugeLabelValueLength

overrides, err := validation.NewOverrides(*limits, nil)
require.NoError(t, err)

testConfig := prepConfig{
numDistributors: 1,
ingestStorageEnabled: true,
Expand Down Expand Up @@ -321,7 +324,7 @@ func TestDistributor_Push_ShouldReturnErrorMappedTo4xxStatusCodeIfWriteRequestCo
sourceIPs, _ := middleware.NewSourceIPs("SomeField", "(.*)", false)

// Send write request through the HTTP handler.
h := Handler(maxRecvMsgSize, nil, sourceIPs, false, nil, RetryConfig{}, distributors[0].PushWithMiddlewares, nil, log.NewNopLogger())
h := Handler(maxRecvMsgSize, nil, sourceIPs, false, overrides, RetryConfig{}, distributors[0].PushWithMiddlewares, nil, log.NewNopLogger())
h.ServeHTTP(resp, createRequest(t, marshalledReq))
assert.Equal(t, http.StatusBadRequest, resp.Code)
})
Expand Down

0 comments on commit de681cd

Please sign in to comment.