Fix panic when defining feature gates only on workload level in scheduler_perf

This commit is contained in:
Maciej Skoczeń 2024-10-15 09:50:51 +00:00
parent 7c53005b6c
commit cca6f8c800

View File

@ -1053,6 +1053,9 @@ func setupTestCase(t testing.TB, tc *testCase, featureGates map[featuregate.Feat
}
func featureGatesMerge(src map[featuregate.Feature]bool, overrides map[featuregate.Feature]bool) map[featuregate.Feature]bool {
if len(src) == 0 {
return maps.Clone(overrides)
}
result := maps.Clone(src)
for feature, enabled := range overrides {
result[feature] = enabled