Skip to content

Commit 18b528e

Browse files
committed
Update test
Signed-off-by: SungJin1212 <[email protected]>
1 parent 11cffdb commit 18b528e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

pkg/util/push/push_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,16 +458,21 @@ func createRequest(t *testing.T, protobuf []byte, isV2 bool) *http.Request {
458458

459459
func createCortexRemoteWriteV2Protobuf(t *testing.T, skipLabelNameValidation bool, source cortexpb.SourceEnum) []byte {
460460
t.Helper()
461-
input := writev2.Request{
461+
462+
input := cortexpb.WriteRequestV2{
462463
Symbols: []string{"", "__name__", "foo"},
463-
Timeseries: []writev2.TimeSeries{
464+
Timeseries: []cortexpb.PreallocTimeseriesV2{
464465
{
465-
LabelsRefs: []uint32{1, 2},
466-
Samples: []writev2.Sample{
467-
{Value: 1, Timestamp: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
466+
TimeSeriesV2: &cortexpb.TimeSeriesV2{
467+
LabelsRefs: []uint32{1, 2},
468+
Samples: []cortexpb.Sample{
469+
{Value: 1, TimestampMs: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
470+
},
468471
},
469472
},
470473
},
474+
Source: source,
475+
SkipLabelNameValidation: skipLabelNameValidation,
471476
}
472477

473478
inoutBytes, err := input.Marshal()

0 commit comments

Comments
 (0)