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

refactor(TestFindDuplicatePods): inline node3 creation

This commit is contained in:
Jan Chaloupka
2025-12-14 16:09:49 +01:00
parent fc033caf21
commit babc4137a4

View File

@@ -79,15 +79,6 @@ func buildTestPodWithRSOwnerRefWithNamespaceForNode1(name, namespace string, app
func TestFindDuplicatePods(t *testing.T) {
// first setup pods
node3 := buildTestNode(nodeName3, func(node *v1.Node) {
node.Spec.Taints = []v1.Taint{
{
Key: "hardware",
Value: "gpu",
Effect: v1.TaintEffectNoSchedule,
},
}
})
node4 := buildTestNode(nodeName4, func(node *v1.Node) {
node.ObjectMeta.Labels = map[string]string{
"datacenter": "east",
@@ -318,7 +309,15 @@ func TestFindDuplicatePods(t *testing.T) {
},
nodes: []*v1.Node{
buildTestNode(nodeName1, nil),
node3,
buildTestNode(nodeName3, func(node *v1.Node) {
node.Spec.Taints = []v1.Taint{
{
Key: "hardware",
Value: "gpu",
Effect: v1.TaintEffectNoSchedule,
},
}
}),
},
expectedEvictedPodCount: 0,
nodefit: true,