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) {
2525 MaxQueriersPerTenant : 5 ,
2626 },
2727 }
28- tenantLimits ["tenant-a" ].RegisterFlags (flag .CommandLine )
28+ fs := flag .NewFlagSet ("test" , flag .ContinueOnError )
29+ tenantLimits ["tenant-a" ].RegisterFlags (fs )
2930
3031 exporter := NewOverridesExporter (newMockTenantLimits (tenantLimits ))
3132
@@ -112,9 +113,10 @@ func TestOverridesExporter_withConfig(t *testing.T) {
112113}
113114
114115func 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 )
118120 t .Run ("float64 should be converted" , func (t * testing.T ) {
119121 require .Equal (t , limits .IngestionRate , extracted ["ingestion_rate" ])
120122 })
You can’t perform that action at this time.
0 commit comments