From 96010e7e7a71812fb98ae75ffbf37a806a51676e Mon Sep 17 00:00:00 2001 From: "Bobby (Babak) Salamat" Date: Tue, 18 Jul 2017 14:36:22 -0700 Subject: [PATCH] Deleted the converted e2e tests --- test/e2e/scheduling/priorities.go | 105 ------------------------------ 1 file changed, 105 deletions(-) diff --git a/test/e2e/scheduling/priorities.go b/test/e2e/scheduling/priorities.go index c5d054e7087..5ceb99c3b05 100644 --- a/test/e2e/scheduling/priorities.go +++ b/test/e2e/scheduling/priorities.go @@ -83,111 +83,6 @@ var _ = SIGDescribe("SchedulerPriorities [Serial]", func() { Expect(err).NotTo(HaveOccurred()) }) - It("Pod should be prefer scheduled to node that satisify the NodeAffinity", func() { - nodeName := GetNodeThatCanRunPod(f) - By("Trying to apply a label on the found node.") - k := fmt.Sprintf("kubernetes.io/e2e-%s", "node-topologyKey") - v := "topologyvalue" - framework.AddOrUpdateLabelOnNode(cs, nodeName, k, v) - framework.ExpectNodeHasLabel(cs, nodeName, k, v) - defer framework.RemoveLabelOffNode(cs, nodeName, k) - - // make the nodes have balanced cpu,mem usage ratio - err := createBalancedPodForNodes(f, cs, ns, nodeList.Items, podRequestedResource, 0.6) - framework.ExpectNoError(err) - By("Trying to relaunch the pod, now with labels.") - labelPodName := "pod-with-node-affinity" - pod := createPausePod(f, pausePodConfig{ - Name: labelPodName, - Affinity: &v1.Affinity{ - NodeAffinity: &v1.NodeAffinity{ - PreferredDuringSchedulingIgnoredDuringExecution: []v1.PreferredSchedulingTerm{ - { - Preference: v1.NodeSelectorTerm{ - MatchExpressions: []v1.NodeSelectorRequirement{ - { - Key: k, - Operator: v1.NodeSelectorOpIn, - Values: []string{v}, - }, - }, - }, - Weight: 20, - }, - }, - }, - }, - }) - By("Wait the pod becomes running.") - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) - labelPod, err := cs.CoreV1().Pods(ns).Get(labelPodName, metav1.GetOptions{}) - framework.ExpectNoError(err) - By("Verify the pod was scheduled to the expected node.") - Expect(labelPod.Spec.NodeName).To(Equal(nodeName)) - }) - - It("Pod should be schedule to node that satisify the PodAffinity", func() { - By("Trying to launch a pod with a label to get a node which can launch it.") - pod := runPausePod(f, pausePodConfig{ - Name: "with-label-security-s1", - Labels: map[string]string{"service": "S1"}, - Resources: podRequestedResource, - }) - nodeName := pod.Spec.NodeName - - By("Trying to apply label on the found node.") - k := fmt.Sprintf("kubernetes.io/e2e-%s", "node-topologyKey") - v := "topologyvalue" - framework.AddOrUpdateLabelOnNode(cs, nodeName, k, v) - framework.ExpectNodeHasLabel(cs, nodeName, k, v) - defer framework.RemoveLabelOffNode(cs, nodeName, k) - // make the nodes have balanced cpu,mem usage - err := createBalancedPodForNodes(f, cs, ns, nodeList.Items, podRequestedResource, 0.6) - framework.ExpectNoError(err) - By("Trying to launch the pod, now with podAffinity.") - labelPodName := "pod-with-podaffinity" - pod = createPausePod(f, pausePodConfig{ - Resources: podRequestedResource, - Name: labelPodName, - Affinity: &v1.Affinity{ - PodAffinity: &v1.PodAffinity{ - PreferredDuringSchedulingIgnoredDuringExecution: []v1.WeightedPodAffinityTerm{ - { - PodAffinityTerm: v1.PodAffinityTerm{ - LabelSelector: &metav1.LabelSelector{ - MatchExpressions: []metav1.LabelSelectorRequirement{ - { - Key: "service", - Operator: metav1.LabelSelectorOpIn, - Values: []string{"S1", "value2"}, - }, - { - Key: "service", - Operator: metav1.LabelSelectorOpNotIn, - Values: []string{"S2"}, - }, { - Key: "service", - Operator: metav1.LabelSelectorOpExists, - }, - }, - }, - TopologyKey: k, - Namespaces: []string{ns}, - }, - Weight: 20, - }, - }, - }, - }, - }) - By("Wait the pod becomes running.") - framework.ExpectNoError(f.WaitForPodRunning(pod.Name)) - labelPod, err := cs.CoreV1().Pods(ns).Get(labelPodName, metav1.GetOptions{}) - framework.ExpectNoError(err) - By("Verify the pod was scheduled to the expected node.") - Expect(labelPod.Spec.NodeName).To(Equal(nodeName)) - }) - It("Pod should be schedule to node that don't match the PodAntiAffinity terms", func() { By("Trying to launch a pod with a label to get a node which can launch it.") pod := runPausePod(f, pausePodConfig{