Skip to content

Commit c0ce881

Browse files
committed
Update test
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
1 parent b18fe8c commit c0ce881

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
@@ -455,16 +455,21 @@ func createRequest(t *testing.T, protobuf []byte, isV2 bool) *http.Request {
455455

456456
func createCortexRemoteWriteV2Protobuf(t *testing.T, skipLabelNameValidation bool, source cortexpb.SourceEnum) []byte {
457457
t.Helper()
458-
input := writev2.Request{
458+
459+
input := cortexpb.WriteRequestV2{
459460
Symbols: []string{"", "__name__", "foo"},
460-
Timeseries: []writev2.TimeSeries{
461+
Timeseries: []cortexpb.PreallocTimeseriesV2{
461462
{
462-
LabelsRefs: []uint32{1, 2},
463-
Samples: []writev2.Sample{
464-
{Value: 1, Timestamp: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
463+
TimeSeriesV2: &cortexpb.TimeSeriesV2{
464+
LabelsRefs: []uint32{1, 2},
465+
Samples: []cortexpb.Sample{
466+
{Value: 1, TimestampMs: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()},
467+
},
465468
},
466469
},
467470
},
471+
Source: source,
472+
SkipLabelNameValidation: skipLabelNameValidation,
468473
}
469474

470475
inoutBytes, err := input.Marshal()

0 commit comments

Comments
 (0)