(t *testing.T, skipLabelNameValidation bool, source cortexpb.SourceEnum)
| 1170 | } |
| 1171 | |
| 1172 | func createCortexRemoteWriteV2Protobuf(t *testing.T, skipLabelNameValidation bool, source cortexpb.SourceEnum) []byte { |
| 1173 | t.Helper() |
| 1174 | |
| 1175 | input := cortexpb.WriteRequestV2{ |
| 1176 | Symbols: []string{"", "__name__", "foo"}, |
| 1177 | Timeseries: []cortexpb.PreallocTimeseriesV2{ |
| 1178 | { |
| 1179 | TimeSeriesV2: &cortexpb.TimeSeriesV2{ |
| 1180 | LabelsRefs: []uint32{1, 2}, |
| 1181 | Samples: []cortexpb.Sample{ |
| 1182 | {Value: 1, TimestampMs: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()}, |
| 1183 | }, |
| 1184 | }, |
| 1185 | }, |
| 1186 | }, |
| 1187 | Source: source, |
| 1188 | SkipLabelNameValidation: skipLabelNameValidation, |
| 1189 | } |
| 1190 | |
| 1191 | inoutBytes, err := input.Marshal() |
| 1192 | require.NoError(t, err) |
| 1193 | return inoutBytes |
| 1194 | } |
| 1195 | |
| 1196 | func createPrometheusRemoteWriteV2Protobuf(t *testing.T) []byte { |
| 1197 | t.Helper() |
no test coverage detected