mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-23 18:35:51 -04:00
Merge pull request #135027 from omerap12/remove-reactor-hpa
Remove unused delete reactor
This commit is contained in:
commit
d6aa2db57e
1 changed files with 0 additions and 13 deletions
|
|
@ -5425,10 +5425,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)
|
||||
|
|
@ -5469,15 +5465,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])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue