better mode setting

This commit is contained in:
Owen Williams 2024-02-06 14:29:12 -05:00
parent f6bc568d8b
commit 3911f6109b
2 changed files with 4 additions and 2 deletions

View file

@ -301,9 +301,10 @@ foo_total 17.0 1520879607.789 # {id="counter-test"} 5`
}
func TestUTF8OpenMetricsParse(t *testing.T) {
oldValidationScheme := model.NameValidationScheme
model.NameValidationScheme = model.UTF8Validation
defer func() {
model.NameValidationScheme = model.LegacyValidation
model.NameValidationScheme = oldValidationScheme
}()
input := `# HELP "go.gc_duration_seconds" A summary of the GC invocation durations.

View file

@ -219,9 +219,10 @@ testmetric{label="\"bar\""} 1`
}
func TestUTF8PromParse(t *testing.T) {
oldValidationScheme := model.NameValidationScheme
model.NameValidationScheme = model.UTF8Validation
defer func() {
model.NameValidationScheme = model.LegacyValidation
model.NameValidationScheme = oldValidationScheme
}()
input := `# HELP "go.gc_duration_seconds" A summary of the GC invocation durations.