From 50a025acdbde37554893e70ce712a231fbd6a91b Mon Sep 17 00:00:00 2001 From: Justin SB Date: Tue, 28 Feb 2023 21:35:18 -0500 Subject: [PATCH] e2e: Remove dead code in tests We were building a local pod variable that we were no longer using. Co-authored-by: Patrick Ohly --- test/e2e/framework/node/resource.go | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/test/e2e/framework/node/resource.go b/test/e2e/framework/node/resource.go index 4ec8aa37332..a8b166c6574 100644 --- a/test/e2e/framework/node/resource.go +++ b/test/e2e/framework/node/resource.go @@ -393,25 +393,6 @@ func isNodeUntainted(node *v1.Node) bool { // isNodeUntaintedWithNonblocking tests whether a fake pod can be scheduled on "node" // but allows for taints in the list of non-blocking taints. func isNodeUntaintedWithNonblocking(node *v1.Node, nonblockingTaints string) bool { - fakePod := &v1.Pod{ - TypeMeta: metav1.TypeMeta{ - Kind: "Pod", - APIVersion: "v1", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: "fake-not-scheduled", - Namespace: "fake-not-scheduled", - }, - Spec: v1.PodSpec{ - Containers: []v1.Container{ - { - Name: "fake-not-scheduled", - Image: "fake-not-scheduled", - }, - }, - }, - } - // Simple lookup for nonblocking taints based on comma-delimited list. nonblockingTaintsMap := map[string]struct{}{} for _, t := range strings.Split(nonblockingTaints, ",") { @@ -431,7 +412,8 @@ func isNodeUntaintedWithNonblocking(node *v1.Node, nonblockingTaints string) boo } n = nodeCopy } - return toleratesTaintsWithNoScheduleNoExecuteEffects(n.Spec.Taints, fakePod.Spec.Tolerations) + + return toleratesTaintsWithNoScheduleNoExecuteEffects(n.Spec.Taints, nil) } func toleratesTaintsWithNoScheduleNoExecuteEffects(taints []v1.Taint, tolerations []v1.Toleration) bool {