mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-14 17:44:06 -08:00
fix mocks and fixture
Signed-off-by: Nicolás Pazos <npazosmendez@gmail.com>
This commit is contained in:
parent
12de4c4a62
commit
0b421384f3
|
@ -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
|
||||
|
|
|
@ -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())},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue