1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

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:18 +02:00
parent 0c9750cc7f
commit f66efaf8db

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 {