diff --git a/pkg/controller/generic_reconciler_test.go b/pkg/controller/generic_reconciler_test.go index dd4a57b7..40650504 100644 --- a/pkg/controller/generic_reconciler_test.go +++ b/pkg/controller/generic_reconciler_test.go @@ -978,7 +978,8 @@ func TestHandleResourceDeletions(t *testing.T) { }, } - for _, tt := range tests { + for _, testCase := range tests { + tt := testCase t.Run(tt.name, func(t *testing.T) { testReconciler, err := createTestReconciler(nil, nil) assert.NoError(t, err) diff --git a/pkg/validations/validation_engine_test.go b/pkg/validations/validation_engine_test.go index 99977469..e43d3fb2 100644 --- a/pkg/validations/validation_engine_test.go +++ b/pkg/validations/validation_engine_test.go @@ -223,7 +223,8 @@ func TestRunValidationsForObjects(t *testing.T) { }, } - for _, tt := range tests { + for _, testCase := range tests { + tt := testCase t.Run(tt.name, func(t *testing.T) { metrics := make(map[string]*prometheus.GaugeVec) ve, err := newValidationEngine("test-resources/config-with-custom-check.yaml", metrics)