From 57226fbd27a2c50cc84df5373c75d25b718f4265 Mon Sep 17 00:00:00 2001 From: carlory Date: Fri, 21 Jul 2023 15:36:43 +0800 Subject: [PATCH] e2e_dra: stop using deprecated framework.ExpectEqual Co-authored-by: Thomas Milox --- test/e2e/dra/deploy.go | 2 +- test/e2e/dra/dra.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/dra/deploy.go b/test/e2e/dra/deploy.go index 180c937e369..2eab75dc589 100644 --- a/test/e2e/dra/deploy.go +++ b/test/e2e/dra/deploy.go @@ -208,7 +208,7 @@ func (d *Driver) SetUp(nodes *Nodes, resources app.Resources) { selector := labels.NewSelector().Add(*requirement) pods, err := d.f.ClientSet.CoreV1().Pods(d.f.Namespace.Name).List(ctx, metav1.ListOptions{LabelSelector: selector.String()}) framework.ExpectNoError(err, "list proxy pods") - framework.ExpectEqual(numNodes, int32(len(pods.Items)), "number of proxy pods") + gomega.Expect(numNodes).To(gomega.Equal(int32(len(pods.Items))), "number of proxy pods") // Run registar and plugin for each of the pods. for _, pod := range pods.Items { diff --git a/test/e2e/dra/dra.go b/test/e2e/dra/dra.go index 006ef971d0a..72377a9717c 100644 --- a/test/e2e/dra/dra.go +++ b/test/e2e/dra/dra.go @@ -646,8 +646,8 @@ var _ = ginkgo.Describe("[sig-node] DRA [Feature:DynamicResourceAllocation]", fu if pod1.Spec.NodeName == "" { framework.Fail("first pod should be running on node, was not scheduled") } - framework.ExpectNotEqual(pod1.Spec.NodeName, node, "first pod should run on different node than second one") - framework.ExpectEqual(driver.Controller.GetNumDeallocations(), int64(1), "number of deallocations") + gomega.Expect(pod1.Spec.NodeName).ToNot(gomega.Equal(node), "first pod should run on different node than second one") + gomega.Expect(driver.Controller.GetNumDeallocations()).To(gomega.Equal(int64(1)), "number of deallocations") }) }) })