mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 03:38:15 +00:00 
			
		
		
		
	e2e: Remove dead code in tests
We were building a local pod variable that we were no longer using. Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user