e2e_dra: stop using deprecated framework.ExpectEqual

Co-authored-by: Thomas Milox <thomasmilox@gmail.com>
This commit is contained in:
carlory 2023-07-21 15:36:43 +08:00
parent 4457f85eb3
commit 57226fbd27
2 changed files with 3 additions and 3 deletions

View File

@ -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 {

View File

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