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:
Humble Chirammal
2023-05-12 11:25:20 +05:30
parent 02659772cb
commit d8e82b1417
7 changed files with 26 additions and 25 deletions

View File

@@ -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))
})
})