fix golint issues in test/e2e_node

This commit is contained in:
SataQiu
2019-11-07 11:59:05 +08:00
parent 41757d673e
commit d2bdf89a8b
44 changed files with 104 additions and 101 deletions

View File

@@ -18,7 +18,7 @@ limitations under the License.
// To run tests in this suite
// NOTE: This test suite requires password-less sudo capabilities to run the kubelet and kube-apiserver.
package e2e_node
package e2enode
import (
"bytes"
@@ -305,7 +305,7 @@ func getNode(c *clientset.Clientset) (*v1.Node, error) {
nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{})
framework.ExpectNoError(err, "should be able to list nodes.")
if nodes == nil {
return nil, fmt.Errorf("the node list is 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.")
if len(nodes.Items) == 0 {