(t *testing.T)
| 1213 | } |
| 1214 | |
| 1215 | func createPrometheusRemoteWriteProtobuf(t *testing.T) []byte { |
| 1216 | t.Helper() |
| 1217 | input := prompb.WriteRequest{ |
| 1218 | Timeseries: []prompb.TimeSeries{ |
| 1219 | { |
| 1220 | Labels: []prompb.Label{ |
| 1221 | {Name: "__name__", Value: "foo"}, |
| 1222 | }, |
| 1223 | Samples: []prompb.Sample{ |
| 1224 | {Value: 1, Timestamp: time.Date(2020, 4, 1, 0, 0, 0, 0, time.UTC).UnixNano()}, |
| 1225 | }, |
| 1226 | }, |
| 1227 | }, |
| 1228 | } |
| 1229 | inoutBytes, err := input.Marshal() |
| 1230 | require.NoError(t, err) |
| 1231 | return inoutBytes |
| 1232 | } |
| 1233 | func createCortexWriteRequestProtobuf(t *testing.T, skipLabelNameValidation bool, source cortexpb.SourceEnum) []byte { |
| 1234 | t.Helper() |
| 1235 | ts := cortexpb.PreallocTimeseries{ |
no test coverage detected