Remove unused delete reactor

Signed-off-by: Omer Aplatony <omerap12@gmail.com>
This commit is contained in:
Omer Aplatony
2025-11-01 06:13:40 +00:00
parent d2e1e3b6bc
commit 264eab46db

View File

@@ -5420,10 +5420,6 @@ func TestMultipleHPAs(t *testing.T) {
return handled, obj, err
})
testClient.AddReactor("delete", "horizontalpodautoscalers", func(action core.Action) (handled bool, ret runtime.Object, err error) {
return true, nil, nil
})
informerFactory := informers.NewSharedInformerFactory(testClient, controller.NoResyncPeriodFunc())
tCtx := ktesting.Init(t)
@@ -5464,15 +5460,6 @@ func TestMultipleHPAs(t *testing.T) {
assert.Len(t, processedHPA, hpaCount, "Expected to process all HPAs")
assert.Equal(t, hpaCount, hpaController.monitor.(*mockMonitor).GetObjectsCount(), "Expected objects count to match number of HPAs")
// Test HPA deletion
hpaName := "dummy-hpa-0"
// Delete the HPA through the API
err := testClient.AutoscalingV2().HorizontalPodAutoscalers(testNamespace).Delete(tCtx, hpaName, metav1.DeleteOptions{})
if err != nil {
t.Fatalf("Failed to delete HPA: %v", err)
}
// Simulate the watch event for deletion
hpaWatcher.Delete(&hpaList[0])