@@ -73,7 +73,7 @@ func TestLimitsLoadingFromYaml(t *testing.T) {
7373 input : `{}` ,
7474 testFunc : func (t * testing.T , l Limits ) {
7575 assert .Equal (t , 1024 , l .MaxLabelNameLength )
76- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
76+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
7777 },
7878 },
7979 {
@@ -87,14 +87,14 @@ func TestLimitsLoadingFromYaml(t *testing.T) {
8787 name : "name_validation_scheme: legacy" ,
8888 input : `name_validation_scheme: "legacy"` ,
8989 testFunc : func (t * testing.T , l Limits ) {
90- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
90+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
9191 },
9292 },
9393 {
9494 name : "name_validation_scheme: utf8" ,
9595 input : `name_validation_scheme: "utf8"` ,
9696 testFunc : func (t * testing.T , l Limits ) {
97- assert .Equal (t , ValidationSchemeValue ( model .UTF8Validation ) , l .NameValidationScheme )
97+ assert .Equal (t , model .UTF8Validation , l .NameValidationScheme )
9898 },
9999 },
100100 }
@@ -120,7 +120,7 @@ func TestLimitsLoadingFromJson(t *testing.T) {
120120 input : `{}` ,
121121 testFunc : func (t * testing.T , l Limits ) {
122122 assert .Equal (t , 1024 , l .MaxLabelNameLength )
123- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
123+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
124124 },
125125 },
126126 {
@@ -134,7 +134,7 @@ func TestLimitsLoadingFromJson(t *testing.T) {
134134 name : "name_validation_scheme: utf8" ,
135135 input : `{"name_validation_scheme": "utf8"}` ,
136136 testFunc : func (t * testing.T , l Limits ) {
137- assert .Equal (t , ValidationSchemeValue ( model .UTF8Validation ) , l .NameValidationScheme )
137+ assert .Equal (t , model .UTF8Validation , l .NameValidationScheme )
138138 },
139139 },
140140 }
@@ -1589,7 +1589,7 @@ func TestLimits_Validate(t *testing.T) {
15891589 cfg : func () Limits {
15901590 cfg := Limits {}
15911591 flagext .DefaultValues (& cfg )
1592- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1592+ cfg .NameValidationScheme = model .LegacyValidation
15931593 cfg .OTelMetricSuffixesEnabled = false
15941594 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
15951595 return cfg
@@ -1600,7 +1600,7 @@ func TestLimits_Validate(t *testing.T) {
16001600 cfg : func () Limits {
16011601 cfg := Limits {}
16021602 flagext .DefaultValues (& cfg )
1603- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1603+ cfg .NameValidationScheme = model .LegacyValidation
16041604 cfg .OTelMetricSuffixesEnabled = true
16051605 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
16061606 return cfg
@@ -1611,7 +1611,7 @@ func TestLimits_Validate(t *testing.T) {
16111611 cfg : func () Limits {
16121612 cfg := Limits {}
16131613 flagext .DefaultValues (& cfg )
1614- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1614+ cfg .NameValidationScheme = model .UTF8Validation
16151615 cfg .OTelMetricSuffixesEnabled = true
16161616 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
16171617 return cfg
@@ -1622,7 +1622,7 @@ func TestLimits_Validate(t *testing.T) {
16221622 cfg : func () Limits {
16231623 cfg := Limits {}
16241624 flagext .DefaultValues (& cfg )
1625- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1625+ cfg .NameValidationScheme = model .UTF8Validation
16261626 cfg .OTelMetricSuffixesEnabled = false
16271627 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
16281628 return cfg
@@ -1633,7 +1633,7 @@ func TestLimits_Validate(t *testing.T) {
16331633 cfg : func () Limits {
16341634 cfg := Limits {}
16351635 flagext .DefaultValues (& cfg )
1636- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1636+ cfg .NameValidationScheme = model .LegacyValidation
16371637 cfg .OTelMetricSuffixesEnabled = false
16381638 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
16391639 return cfg
@@ -1648,7 +1648,7 @@ func TestLimits_Validate(t *testing.T) {
16481648 cfg : func () Limits {
16491649 cfg := Limits {}
16501650 flagext .DefaultValues (& cfg )
1651- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1651+ cfg .NameValidationScheme = model .LegacyValidation
16521652 cfg .OTelMetricSuffixesEnabled = true
16531653 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
16541654 return cfg
@@ -1663,7 +1663,7 @@ func TestLimits_Validate(t *testing.T) {
16631663 cfg : func () Limits {
16641664 cfg := Limits {}
16651665 flagext .DefaultValues (& cfg )
1666- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1666+ cfg .NameValidationScheme = model .UTF8Validation
16671667 cfg .OTelMetricSuffixesEnabled = true
16681668 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
16691669 return cfg
@@ -1678,7 +1678,7 @@ func TestLimits_Validate(t *testing.T) {
16781678 cfg : func () Limits {
16791679 cfg := Limits {}
16801680 flagext .DefaultValues (& cfg )
1681- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1681+ cfg .NameValidationScheme = model .UTF8Validation
16821682 cfg .OTelMetricSuffixesEnabled = false
16831683 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
16841684 return cfg
@@ -1693,7 +1693,7 @@ func TestLimits_Validate(t *testing.T) {
16931693 cfg : func () Limits {
16941694 cfg := Limits {}
16951695 flagext .DefaultValues (& cfg )
1696- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1696+ cfg .NameValidationScheme = model .UTF8Validation
16971697 cfg .OTelMetricSuffixesEnabled = false
16981698 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
16991699 return cfg
@@ -1704,7 +1704,7 @@ func TestLimits_Validate(t *testing.T) {
17041704 cfg : func () Limits {
17051705 cfg := Limits {}
17061706 flagext .DefaultValues (& cfg )
1707- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1707+ cfg .NameValidationScheme = model .LegacyValidation
17081708 cfg .OTelMetricSuffixesEnabled = true
17091709 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
17101710 return cfg
@@ -1715,7 +1715,7 @@ func TestLimits_Validate(t *testing.T) {
17151715 cfg : func () Limits {
17161716 cfg := Limits {}
17171717 flagext .DefaultValues (& cfg )
1718- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1718+ cfg .NameValidationScheme = model .UTF8Validation
17191719 cfg .OTelMetricSuffixesEnabled = true
17201720 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
17211721 return cfg
@@ -1726,7 +1726,7 @@ func TestLimits_Validate(t *testing.T) {
17261726 cfg : func () Limits {
17271727 cfg := Limits {}
17281728 flagext .DefaultValues (& cfg )
1729- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1729+ cfg .NameValidationScheme = model .LegacyValidation
17301730 cfg .OTelMetricSuffixesEnabled = false
17311731 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
17321732 return cfg
@@ -1737,7 +1737,7 @@ func TestLimits_Validate(t *testing.T) {
17371737 cfg : func () Limits {
17381738 cfg := Limits {}
17391739 flagext .DefaultValues (& cfg )
1740- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1740+ cfg .NameValidationScheme = model .LegacyValidation
17411741 cfg .OTelMetricSuffixesEnabled = true
17421742 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
17431743 return cfg
@@ -1748,7 +1748,7 @@ func TestLimits_Validate(t *testing.T) {
17481748 cfg : func () Limits {
17491749 cfg := Limits {}
17501750 flagext .DefaultValues (& cfg )
1751- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1751+ cfg .NameValidationScheme = model .UTF8Validation
17521752 cfg .OTelMetricSuffixesEnabled = false
17531753 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
17541754 return cfg
@@ -1759,7 +1759,7 @@ func TestLimits_Validate(t *testing.T) {
17591759 cfg : func () Limits {
17601760 cfg := Limits {}
17611761 flagext .DefaultValues (& cfg )
1762- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1762+ cfg .NameValidationScheme = model .LegacyValidation
17631763 cfg .OTelMetricSuffixesEnabled = false
17641764 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
17651765 return cfg
@@ -1770,7 +1770,7 @@ func TestLimits_Validate(t *testing.T) {
17701770 cfg : func () Limits {
17711771 cfg := Limits {}
17721772 flagext .DefaultValues (& cfg )
1773- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1773+ cfg .NameValidationScheme = model .UTF8Validation
17741774 cfg .OTelMetricSuffixesEnabled = true
17751775 cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
17761776 return cfg
@@ -2180,7 +2180,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
21802180 limits : map [string ]* Limits {
21812181 "tenant1" : {
21822182 OTelTranslationStrategy : OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes ),
2183- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2183+ NameValidationScheme : model .UTF8Validation ,
21842184 OTelMetricSuffixesEnabled : false ,
21852185 },
21862186 },
@@ -2192,7 +2192,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
21922192 limits : map [string ]* Limits {
21932193 "tenant1" : {
21942194 OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2195- NameValidationScheme : ValidationSchemeValue ( model .LegacyValidation ) ,
2195+ NameValidationScheme : model .LegacyValidation ,
21962196 OTelMetricSuffixesEnabled : true ,
21972197 },
21982198 },
@@ -2204,7 +2204,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
22042204 limits : map [string ]* Limits {
22052205 "tenant1" : {
22062206 OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2207- NameValidationScheme : ValidationSchemeValue ( model .LegacyValidation ) ,
2207+ NameValidationScheme : model .LegacyValidation ,
22082208 OTelMetricSuffixesEnabled : false ,
22092209 },
22102210 },
@@ -2216,7 +2216,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
22162216 limits : map [string ]* Limits {
22172217 "tenant1" : {
22182218 OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2219- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2219+ NameValidationScheme : model .UTF8Validation ,
22202220 OTelMetricSuffixesEnabled : true ,
22212221 },
22222222 },
@@ -2228,7 +2228,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
22282228 limits : map [string ]* Limits {
22292229 "tenant1" : {
22302230 OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2231- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2231+ NameValidationScheme : model .UTF8Validation ,
22322232 OTelMetricSuffixesEnabled : false ,
22332233 },
22342234 },
@@ -2257,7 +2257,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
22572257 limits := map [string ]* Limits {
22582258 "tenant1" : {
22592259 OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2260- NameValidationScheme : ValidationSchemeValue (999 ), // Invalid scheme
2260+ NameValidationScheme : model . ValidationScheme (999 ), // Invalid scheme
22612261 OTelMetricSuffixesEnabled : true ,
22622262 },
22632263 }
0 commit comments