mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-26 19:35:10 +00:00
e2e: use gomega.Expect instead of framework.ExpectEqual in windows/*
stop using deprecated framework.ExpectEqual Ref#115961 Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/onsi/ginkgo/v2"
|
||||
"github.com/onsi/gomega"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
@@ -168,7 +169,7 @@ var _ = SIGDescribe("[Feature:Windows] [Excluded:WindowsDocker] [MinimumKubeletV
|
||||
metav1.GetOptions{})
|
||||
|
||||
framework.ExpectNoError(err, "Error retrieving pod")
|
||||
framework.ExpectEqual(p.Status.Phase, v1.PodSucceeded)
|
||||
gomega.Expect(p.Status.Phase).To(gomega.Equal(v1.PodSucceeded))
|
||||
|
||||
ginkgo.By("Waiting for Windows worker rebooting")
|
||||
|
||||
@@ -195,10 +196,10 @@ var _ = SIGDescribe("[Feature:Windows] [Excluded:WindowsDocker] [MinimumKubeletV
|
||||
}
|
||||
|
||||
ginkgo.By("Checking whether agn-test-pod is rebooted")
|
||||
framework.ExpectEqual(restartCount, 1)
|
||||
gomega.Expect(restartCount).To(gomega.Equal(1), "restart count of agn-test-pod is 1")
|
||||
|
||||
agnPodOut, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).Get(ctx, agnPod.Name, metav1.GetOptions{})
|
||||
framework.ExpectEqual(agnPodOut.Status.Phase, v1.PodRunning)
|
||||
gomega.Expect(agnPodOut.Status.Phase).To(gomega.Equal(v1.PodRunning))
|
||||
framework.ExpectNoError(err, "getting pod info after reboot")
|
||||
assertConsistentConnectivity(ctx, f, nginxPod.ObjectMeta.Name, "linux", linuxCheck(agnPodOut.Status.PodIP, 80))
|
||||
|
||||
@@ -251,6 +252,6 @@ var _ = SIGDescribe("[Feature:Windows] [Excluded:WindowsDocker] [MinimumKubeletV
|
||||
metav1.GetOptions{})
|
||||
|
||||
framework.ExpectNoError(err, "Error retrieving pod")
|
||||
framework.ExpectEqual(p.Status.Phase, v1.PodSucceeded)
|
||||
gomega.Expect(p.Status.Phase).To(gomega.Equal(v1.PodSucceeded))
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user