From f66efaf8db1792d78c4e6eaf8ebec0b679a44204 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Fri, 19 Jul 2024 09:25:18 +0200 Subject: [PATCH] e2e: TestRemoveDuplicates: limit the tested namespace RemoveDuplicates is namespaced scope. Limiting the namespace will avoid unexpected evictions from other namespaces. --- test/e2e/e2e_duplicatepods_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/e2e_duplicatepods_test.go b/test/e2e/e2e_duplicatepods_test.go index e0f543bdf..685a2571e 100644 --- a/test/e2e/e2e_duplicatepods_test.go +++ b/test/e2e/e2e_duplicatepods_test.go @@ -21,6 +21,7 @@ import ( "strings" "testing" + "sigs.k8s.io/descheduler/pkg/api" frameworkfake "sigs.k8s.io/descheduler/pkg/framework/fake" "sigs.k8s.io/descheduler/pkg/framework/plugins/defaultevictor" "sigs.k8s.io/descheduler/pkg/framework/plugins/removeduplicates" @@ -201,7 +202,11 @@ func TestRemoveDuplicates(t *testing.T) { SharedInformerFactoryImpl: sharedInformerFactory, } - plugin, err := removeduplicates.New(&removeduplicates.RemoveDuplicatesArgs{}, + plugin, err := removeduplicates.New(&removeduplicates.RemoveDuplicatesArgs{ + Namespaces: &api.Namespaces{ + Include: []string{testNamespace.Name}, + }, + }, handle, ) if err != nil {