mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
Merge pull request #120305 from Rei1010/cleanUp
e2e_scheduling:stop using deprecated framework.ExpectError
This commit is contained in:
commit
6586296afc
@ -163,12 +163,12 @@ var _ = SIGDescribe("LimitRange", func() {
|
||||
ginkgo.By("Failing to create a Pod with less than min resources")
|
||||
pod = newTestPod(podName, getResourceList("10m", "50Mi", "50Gi"), v1.ResourceList{})
|
||||
_, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(ctx, pod, metav1.CreateOptions{})
|
||||
framework.ExpectError(err)
|
||||
gomega.Expect(err).To(gomega.HaveOccurred())
|
||||
|
||||
ginkgo.By("Failing to create a Pod with more than max resources")
|
||||
pod = newTestPod(podName, getResourceList("600m", "600Mi", "600Gi"), v1.ResourceList{})
|
||||
_, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(ctx, pod, metav1.CreateOptions{})
|
||||
framework.ExpectError(err)
|
||||
gomega.Expect(err).To(gomega.HaveOccurred())
|
||||
|
||||
ginkgo.By("Updating a LimitRange")
|
||||
newMin := getResourceList("9m", "49Mi", "49Gi")
|
||||
@ -192,7 +192,7 @@ var _ = SIGDescribe("LimitRange", func() {
|
||||
ginkgo.By("Failing to create a Pod with more than max resources")
|
||||
pod = newTestPod(podName, getResourceList("600m", "600Mi", "600Gi"), v1.ResourceList{})
|
||||
_, err = f.ClientSet.CoreV1().Pods(f.Namespace.Name).Create(ctx, pod, metav1.CreateOptions{})
|
||||
framework.ExpectError(err)
|
||||
gomega.Expect(err).To(gomega.HaveOccurred())
|
||||
|
||||
ginkgo.By("Deleting a LimitRange")
|
||||
err = f.ClientSet.CoreV1().LimitRanges(f.Namespace.Name).Delete(ctx, limitRange.Name, *metav1.NewDeleteOptions(30))
|
||||
|
@ -814,13 +814,13 @@ var _ = SIGDescribe("SchedulerPreemption [Serial]", func() {
|
||||
pcCopy := pcs[0].DeepCopy()
|
||||
pcCopy.Value = pcCopy.Value * 10
|
||||
err := patchPriorityClass(ctx, cs, pcs[0], pcCopy)
|
||||
framework.ExpectError(err, "expect a patch error on an immutable field")
|
||||
gomega.Expect(err).To(gomega.HaveOccurred(), "expect a patch error on an immutable field")
|
||||
framework.Logf("%v", err)
|
||||
|
||||
pcCopy = pcs[1].DeepCopy()
|
||||
pcCopy.Value = pcCopy.Value * 10
|
||||
_, err = cs.SchedulingV1().PriorityClasses().Update(ctx, pcCopy, metav1.UpdateOptions{})
|
||||
framework.ExpectError(err, "expect an update error on an immutable field")
|
||||
gomega.Expect(err).To(gomega.HaveOccurred(), "expect an update error on an immutable field")
|
||||
framework.Logf("%v", err)
|
||||
|
||||
// 2. Patch/Update on mutable fields will succeed.
|
||||
|
Loading…
Reference in New Issue
Block a user