mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-22 07:03:28 +00:00
Merge pull request #135027 from omerap12/remove-reactor-hpa
Remove unused delete reactor
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user