Merge pull request #119989 from bzsuni/cleanup/e2e/auth

[e2e_auth] stop using deprecated framework.ExpectNotEqual
This commit is contained in:
Kubernetes Prow Robot 2023-09-02 07:33:11 -07:00 committed by GitHub
commit 84faedfbfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -53,7 +53,7 @@ var _ = SIGDescribe("[Feature:NodeAuthenticator]", func() {
}
nodeIPs := e2enode.GetAddressesByTypeAndFamily(&nodes.Items[0], v1.NodeInternalIP, family)
framework.ExpectNotEqual(len(nodeIPs), 0)
gomega.Expect(nodeIPs).NotTo(gomega.BeEmpty())
})
ginkgo.It("The kubelet's main port 10250 should reject requests with no credentials", func(ctx context.Context) {

View File

@ -33,6 +33,7 @@ import (
admissionapi "k8s.io/pod-security-admission/api"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
const (
@ -54,7 +55,7 @@ var _ = SIGDescribe("[Feature:NodeAuthorizer]", func() {
nodeList, err := f.ClientSet.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
framework.ExpectNoError(err, "failed to list nodes in namespace: %s", ns)
framework.ExpectNotEqual(len(nodeList.Items), 0)
gomega.Expect(nodeList.Items).NotTo(gomega.BeEmpty())
nodeName = nodeList.Items[0].Name
asUser = nodeNamePrefix + nodeName
ginkgo.By("Creating a kubernetes client that impersonates a node")