@@ -73,7 +73,7 @@ func TestLimitsLoadingFromYaml(t *testing.T) {
73
73
input : `{}` ,
74
74
testFunc : func (t * testing.T , l Limits ) {
75
75
assert .Equal (t , 1024 , l .MaxLabelNameLength )
76
- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
76
+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
77
77
},
78
78
},
79
79
{
@@ -87,14 +87,14 @@ func TestLimitsLoadingFromYaml(t *testing.T) {
87
87
name : "name_validation_scheme: legacy" ,
88
88
input : `name_validation_scheme: "legacy"` ,
89
89
testFunc : func (t * testing.T , l Limits ) {
90
- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
90
+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
91
91
},
92
92
},
93
93
{
94
94
name : "name_validation_scheme: utf8" ,
95
95
input : `name_validation_scheme: "utf8"` ,
96
96
testFunc : func (t * testing.T , l Limits ) {
97
- assert .Equal (t , ValidationSchemeValue ( model .UTF8Validation ) , l .NameValidationScheme )
97
+ assert .Equal (t , model .UTF8Validation , l .NameValidationScheme )
98
98
},
99
99
},
100
100
}
@@ -120,7 +120,7 @@ func TestLimitsLoadingFromJson(t *testing.T) {
120
120
input : `{}` ,
121
121
testFunc : func (t * testing.T , l Limits ) {
122
122
assert .Equal (t , 1024 , l .MaxLabelNameLength )
123
- assert .Equal (t , ValidationSchemeValue ( model .LegacyValidation ) , l .NameValidationScheme )
123
+ assert .Equal (t , model .LegacyValidation , l .NameValidationScheme )
124
124
},
125
125
},
126
126
{
@@ -134,7 +134,7 @@ func TestLimitsLoadingFromJson(t *testing.T) {
134
134
name : "name_validation_scheme: utf8" ,
135
135
input : `{"name_validation_scheme": "utf8"}` ,
136
136
testFunc : func (t * testing.T , l Limits ) {
137
- assert .Equal (t , ValidationSchemeValue ( model .UTF8Validation ) , l .NameValidationScheme )
137
+ assert .Equal (t , model .UTF8Validation , l .NameValidationScheme )
138
138
},
139
139
},
140
140
}
@@ -1589,7 +1589,7 @@ func TestLimits_Validate(t *testing.T) {
1589
1589
cfg : func () Limits {
1590
1590
cfg := Limits {}
1591
1591
flagext .DefaultValues (& cfg )
1592
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1592
+ cfg .NameValidationScheme = model .LegacyValidation
1593
1593
cfg .OTelMetricSuffixesEnabled = false
1594
1594
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
1595
1595
return cfg
@@ -1600,7 +1600,7 @@ func TestLimits_Validate(t *testing.T) {
1600
1600
cfg : func () Limits {
1601
1601
cfg := Limits {}
1602
1602
flagext .DefaultValues (& cfg )
1603
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1603
+ cfg .NameValidationScheme = model .LegacyValidation
1604
1604
cfg .OTelMetricSuffixesEnabled = true
1605
1605
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
1606
1606
return cfg
@@ -1611,7 +1611,7 @@ func TestLimits_Validate(t *testing.T) {
1611
1611
cfg : func () Limits {
1612
1612
cfg := Limits {}
1613
1613
flagext .DefaultValues (& cfg )
1614
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1614
+ cfg .NameValidationScheme = model .UTF8Validation
1615
1615
cfg .OTelMetricSuffixesEnabled = true
1616
1616
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
1617
1617
return cfg
@@ -1622,7 +1622,7 @@ func TestLimits_Validate(t *testing.T) {
1622
1622
cfg : func () Limits {
1623
1623
cfg := Limits {}
1624
1624
flagext .DefaultValues (& cfg )
1625
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1625
+ cfg .NameValidationScheme = model .UTF8Validation
1626
1626
cfg .OTelMetricSuffixesEnabled = false
1627
1627
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
1628
1628
return cfg
@@ -1633,7 +1633,7 @@ func TestLimits_Validate(t *testing.T) {
1633
1633
cfg : func () Limits {
1634
1634
cfg := Limits {}
1635
1635
flagext .DefaultValues (& cfg )
1636
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1636
+ cfg .NameValidationScheme = model .LegacyValidation
1637
1637
cfg .OTelMetricSuffixesEnabled = false
1638
1638
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
1639
1639
return cfg
@@ -1648,7 +1648,7 @@ func TestLimits_Validate(t *testing.T) {
1648
1648
cfg : func () Limits {
1649
1649
cfg := Limits {}
1650
1650
flagext .DefaultValues (& cfg )
1651
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1651
+ cfg .NameValidationScheme = model .LegacyValidation
1652
1652
cfg .OTelMetricSuffixesEnabled = true
1653
1653
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
1654
1654
return cfg
@@ -1663,7 +1663,7 @@ func TestLimits_Validate(t *testing.T) {
1663
1663
cfg : func () Limits {
1664
1664
cfg := Limits {}
1665
1665
flagext .DefaultValues (& cfg )
1666
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1666
+ cfg .NameValidationScheme = model .UTF8Validation
1667
1667
cfg .OTelMetricSuffixesEnabled = true
1668
1668
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
1669
1669
return cfg
@@ -1678,7 +1678,7 @@ func TestLimits_Validate(t *testing.T) {
1678
1678
cfg : func () Limits {
1679
1679
cfg := Limits {}
1680
1680
flagext .DefaultValues (& cfg )
1681
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1681
+ cfg .NameValidationScheme = model .UTF8Validation
1682
1682
cfg .OTelMetricSuffixesEnabled = false
1683
1683
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue ("" )
1684
1684
return cfg
@@ -1693,7 +1693,7 @@ func TestLimits_Validate(t *testing.T) {
1693
1693
cfg : func () Limits {
1694
1694
cfg := Limits {}
1695
1695
flagext .DefaultValues (& cfg )
1696
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1696
+ cfg .NameValidationScheme = model .UTF8Validation
1697
1697
cfg .OTelMetricSuffixesEnabled = false
1698
1698
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
1699
1699
return cfg
@@ -1704,7 +1704,7 @@ func TestLimits_Validate(t *testing.T) {
1704
1704
cfg : func () Limits {
1705
1705
cfg := Limits {}
1706
1706
flagext .DefaultValues (& cfg )
1707
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1707
+ cfg .NameValidationScheme = model .LegacyValidation
1708
1708
cfg .OTelMetricSuffixesEnabled = true
1709
1709
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithoutSuffixes )
1710
1710
return cfg
@@ -1715,7 +1715,7 @@ func TestLimits_Validate(t *testing.T) {
1715
1715
cfg : func () Limits {
1716
1716
cfg := Limits {}
1717
1717
flagext .DefaultValues (& cfg )
1718
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1718
+ cfg .NameValidationScheme = model .UTF8Validation
1719
1719
cfg .OTelMetricSuffixesEnabled = true
1720
1720
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
1721
1721
return cfg
@@ -1726,7 +1726,7 @@ func TestLimits_Validate(t *testing.T) {
1726
1726
cfg : func () Limits {
1727
1727
cfg := Limits {}
1728
1728
flagext .DefaultValues (& cfg )
1729
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1729
+ cfg .NameValidationScheme = model .LegacyValidation
1730
1730
cfg .OTelMetricSuffixesEnabled = false
1731
1731
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes )
1732
1732
return cfg
@@ -1737,7 +1737,7 @@ func TestLimits_Validate(t *testing.T) {
1737
1737
cfg : func () Limits {
1738
1738
cfg := Limits {}
1739
1739
flagext .DefaultValues (& cfg )
1740
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1740
+ cfg .NameValidationScheme = model .LegacyValidation
1741
1741
cfg .OTelMetricSuffixesEnabled = true
1742
1742
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
1743
1743
return cfg
@@ -1748,7 +1748,7 @@ func TestLimits_Validate(t *testing.T) {
1748
1748
cfg : func () Limits {
1749
1749
cfg := Limits {}
1750
1750
flagext .DefaultValues (& cfg )
1751
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1751
+ cfg .NameValidationScheme = model .UTF8Validation
1752
1752
cfg .OTelMetricSuffixesEnabled = false
1753
1753
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoUTF8EscapingWithSuffixes )
1754
1754
return cfg
@@ -1759,7 +1759,7 @@ func TestLimits_Validate(t *testing.T) {
1759
1759
cfg : func () Limits {
1760
1760
cfg := Limits {}
1761
1761
flagext .DefaultValues (& cfg )
1762
- cfg .NameValidationScheme = ValidationSchemeValue ( model .LegacyValidation )
1762
+ cfg .NameValidationScheme = model .LegacyValidation
1763
1763
cfg .OTelMetricSuffixesEnabled = false
1764
1764
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
1765
1765
return cfg
@@ -1770,7 +1770,7 @@ func TestLimits_Validate(t *testing.T) {
1770
1770
cfg : func () Limits {
1771
1771
cfg := Limits {}
1772
1772
flagext .DefaultValues (& cfg )
1773
- cfg .NameValidationScheme = ValidationSchemeValue ( model .UTF8Validation )
1773
+ cfg .NameValidationScheme = model .UTF8Validation
1774
1774
cfg .OTelMetricSuffixesEnabled = true
1775
1775
cfg .OTelTranslationStrategy = OTelTranslationStrategyValue (otlptranslator .NoTranslation )
1776
1776
return cfg
@@ -2180,7 +2180,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2180
2180
limits : map [string ]* Limits {
2181
2181
"tenant1" : {
2182
2182
OTelTranslationStrategy : OTelTranslationStrategyValue (otlptranslator .UnderscoreEscapingWithSuffixes ),
2183
- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2183
+ NameValidationScheme : model .UTF8Validation ,
2184
2184
OTelMetricSuffixesEnabled : false ,
2185
2185
},
2186
2186
},
@@ -2192,7 +2192,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2192
2192
limits : map [string ]* Limits {
2193
2193
"tenant1" : {
2194
2194
OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2195
- NameValidationScheme : ValidationSchemeValue ( model .LegacyValidation ) ,
2195
+ NameValidationScheme : model .LegacyValidation ,
2196
2196
OTelMetricSuffixesEnabled : true ,
2197
2197
},
2198
2198
},
@@ -2204,7 +2204,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2204
2204
limits : map [string ]* Limits {
2205
2205
"tenant1" : {
2206
2206
OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2207
- NameValidationScheme : ValidationSchemeValue ( model .LegacyValidation ) ,
2207
+ NameValidationScheme : model .LegacyValidation ,
2208
2208
OTelMetricSuffixesEnabled : false ,
2209
2209
},
2210
2210
},
@@ -2216,7 +2216,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2216
2216
limits : map [string ]* Limits {
2217
2217
"tenant1" : {
2218
2218
OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2219
- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2219
+ NameValidationScheme : model .UTF8Validation ,
2220
2220
OTelMetricSuffixesEnabled : true ,
2221
2221
},
2222
2222
},
@@ -2228,7 +2228,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2228
2228
limits : map [string ]* Limits {
2229
2229
"tenant1" : {
2230
2230
OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2231
- NameValidationScheme : ValidationSchemeValue ( model .UTF8Validation ) ,
2231
+ NameValidationScheme : model .UTF8Validation ,
2232
2232
OTelMetricSuffixesEnabled : false ,
2233
2233
},
2234
2234
},
@@ -2257,7 +2257,7 @@ func TestOverrides_OTelTranslationStrategy(t *testing.T) {
2257
2257
limits := map [string ]* Limits {
2258
2258
"tenant1" : {
2259
2259
OTelTranslationStrategy : OTelTranslationStrategyValue ("" ),
2260
- NameValidationScheme : ValidationSchemeValue (999 ), // Invalid scheme
2260
+ NameValidationScheme : model . ValidationScheme (999 ), // Invalid scheme
2261
2261
OTelMetricSuffixesEnabled : true ,
2262
2262
},
2263
2263
}
0 commit comments