mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
Remove unused delete reactor
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user