func nextRawChunkAsJson(t *testing.T, mapper tsdb.Mapper) string { r, err := mapper.NextChunk() if err != nil { t.Fatalf("failed to get next chunk from mapper: %s", err.Error()) } return mustMarshalMapperOutput(r) }
func nextRawChunkAsJson(t *testing.T, mapper tsdb.Mapper) string { r, err := mapper.NextChunk() if err != nil { t.Fatalf("failed to get next chunk from mapper: %s", err.Error()) } b, err := json.Marshal(r) if err != nil { t.Fatalf("failed to marshal chunk as JSON: %s", err.Error()) } return string(b) }