diff --git a/promql/fuzz.go b/promql/fuzz.go index 3fd50b9496..c07653dfcb 100644 --- a/promql/fuzz.go +++ b/promql/fuzz.go @@ -12,7 +12,6 @@ // limitations under the License. // Only build when go-fuzz is in use -//go:build gofuzz package promql @@ -68,6 +67,13 @@ func fuzzParseMetricWithContentType(in []byte, contentType string) int { panic(warning) } + switch contentType { + case "application/openmetrics-text": + p = textparse.NewOpenMetricsParserWithOpts(in, symbolTable, textparse.WithSkipCT(false)) + default: + break + } + var err error for { _, err = p.Next()