Commit 6f2b88cb authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #21516 from nikhiljindal/limitRangee2e

Auto commit by PR queue bot
parents 06a6aaca 68dec277
...@@ -61,7 +61,11 @@ var _ = Describe("LimitRange", func() { ...@@ -61,7 +61,11 @@ var _ = Describe("LimitRange", func() {
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
for i := range pod.Spec.Containers { for i := range pod.Spec.Containers {
err = equalResourceRequirement(expected, pod.Spec.Containers[i].Resources) err = equalResourceRequirement(expected, pod.Spec.Containers[i].Resources)
Expect(err).NotTo(HaveOccurred()) if err != nil {
// Print the pod to help in debugging.
Logf("Pod %+v does not have the expected requirements", pod)
Expect(err).NotTo(HaveOccurred())
}
} }
By("Creating a Pod with partial resource requirements") By("Creating a Pod with partial resource requirements")
...@@ -78,7 +82,11 @@ var _ = Describe("LimitRange", func() { ...@@ -78,7 +82,11 @@ var _ = Describe("LimitRange", func() {
expected = api.ResourceRequirements{Requests: getResourceList("300m", "150Mi"), Limits: getResourceList("300m", "500Mi")} expected = api.ResourceRequirements{Requests: getResourceList("300m", "150Mi"), Limits: getResourceList("300m", "500Mi")}
for i := range pod.Spec.Containers { for i := range pod.Spec.Containers {
err = equalResourceRequirement(expected, pod.Spec.Containers[i].Resources) err = equalResourceRequirement(expected, pod.Spec.Containers[i].Resources)
Expect(err).NotTo(HaveOccurred()) if err != nil {
// Print the pod to help in debugging.
Logf("Pod %+v does not have the expected requirements", pod)
Expect(err).NotTo(HaveOccurred())
}
} }
By("Failing to create a Pod with less than min resources") By("Failing to create a Pod with less than min resources")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment