e2e_network: stop using deprecated framework.ExpectEqual

This commit is contained in:
carlory
2023-07-21 16:22:31 +08:00
parent 4457f85eb3
commit e290b4cb3b
12 changed files with 91 additions and 70 deletions

View File

@@ -26,6 +26,7 @@ import (
"time"
"github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -178,7 +179,7 @@ func execHostnameTest(sourcePod v1.Pod, targetAddr, targetHostname string) {
hostname := strings.TrimSpace(strings.Split(stdout, ".")[0])
framework.ExpectNoError(err)
framework.ExpectEqual(hostname, targetHostname)
gomega.Expect(hostname).To(gomega.Equal(targetHostname))
}
// createSecondNodePortService creates a service with the same selector as config.NodePortService and same HTTP Port