mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
fix: add condition for OM fuzzing
Signed-off-by: Manik Rana <manikrana54@gmail.com>
This commit is contained in:
parent
4a3e8d13ad
commit
86bd98d567
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue