File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ func TestOverridesExporter_withConfig(t *testing.T) {
25
25
MaxQueriersPerTenant : 5 ,
26
26
},
27
27
}
28
- tenantLimits ["tenant-a" ].RegisterFlags (flag .CommandLine )
28
+ fs := flag .NewFlagSet ("test" , flag .ContinueOnError )
29
+ tenantLimits ["tenant-a" ].RegisterFlags (fs )
29
30
30
31
exporter := NewOverridesExporter (newMockTenantLimits (tenantLimits ))
31
32
@@ -112,9 +113,10 @@ func TestOverridesExporter_withConfig(t *testing.T) {
112
113
}
113
114
114
115
func TestExtractNumericalValues (t * testing.T ) {
115
- limits := Limits {}
116
- limits .RegisterFlags (flag .CommandLine )
117
- extracted := ExtractNumericalValues (& limits )
116
+ limits := & Limits {}
117
+ fs := flag .NewFlagSet ("test" , flag .ContinueOnError )
118
+ limits .RegisterFlags (fs )
119
+ extracted := ExtractNumericalValues (limits )
118
120
t .Run ("float64 should be converted" , func (t * testing.T ) {
119
121
require .Equal (t , limits .IngestionRate , extracted ["ingestion_rate" ])
120
122
})
You can’t perform that action at this time.
0 commit comments