fix mocks and fixture

Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
Nicolás Pazos 2023-10-02 13:29:31 -03:00
parent 12de4c4a62
commit 0b421384f3
2 changed files with 3 additions and 3 deletions

View file

@ -352,7 +352,7 @@ func NewTestClient(name, url string) WriteClient {
return &TestClient{name: name, url: url}
}
func (c *TestClient) Store(_ context.Context, req []byte) error {
func (c *TestClient) Store(_ context.Context, req []byte, _ int) error {
r := rand.Intn(200-100) + 100
time.Sleep(time.Duration(r) * time.Millisecond)
return nil

View file

@ -108,7 +108,7 @@ var writeRequestWithRefsFixture = &prompb.WriteRequestWithRefs{
Exemplars: []prompb.ExemplarRef{{Labels: []prompb.LabelRef{
{NameRef: 10, ValueRef: 11},
}, Value: 1, Timestamp: 0}},
Histograms: []prompb.Histogram{HistogramToHistogramProto(0, &testHistogram)},
Histograms: []prompb.Histogram{HistogramToHistogramProto(0, &testHistogram), FloatHistogramToHistogramProto(1, testHistogram.ToFloat())},
},
{
Labels: []prompb.LabelRef{
@ -122,7 +122,7 @@ var writeRequestWithRefsFixture = &prompb.WriteRequestWithRefs{
Exemplars: []prompb.ExemplarRef{{Labels: []prompb.LabelRef{
{NameRef: 12, ValueRef: 13},
}, Value: 2, Timestamp: 1}},
Histograms: []prompb.Histogram{HistogramToHistogramProto(1, &testHistogram)},
Histograms: []prompb.Histogram{HistogramToHistogramProto(2, &testHistogram), FloatHistogramToHistogramProto(3, testHistogram.ToFloat())},
},
},
}