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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user