e2e: TestRemoveDuplicates: limit the tested namespace

RemoveDuplicates is namespaced scope. Limiting the namespace will avoid
unexpected evictions from other namespaces.
This commit is contained in:
Jan Chaloupka
2024-07-19 09:25:20 +02:00
parent 0c9750cc7f
commit f66efaf8db
+6 -1
View File
@@ -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 {