test/e2e_node/:use framework.Equal() instead of using gomega.Expect(bool).To(gomega.BeTrue(),explain)

This commit is contained in:
tanjunchen
2019-12-11 18:23:44 +08:00
parent eef4c00ae9
commit 35b0f1f7dd
6 changed files with 14 additions and 16 deletions

View File

@@ -307,7 +307,7 @@ func getNode(c *clientset.Clientset) (*v1.Node, error) {
if nodes == nil {
return nil, fmt.Errorf("the node list is nil")
}
gomega.Expect(len(nodes.Items) > 1).NotTo(gomega.BeTrue(), "the number of nodes is more than 1.")
framework.ExpectEqual(len(nodes.Items) > 1, false, "the number of nodes is more than 1.")
if len(nodes.Items) == 0 {
return nil, fmt.Errorf("empty node list: %+v", nodes)
}