Skip to content

Commit

Permalink
fix unitest
Browse files Browse the repository at this point in the history
  • Loading branch information
Gong Yongjie committed Apr 8, 2024
1 parent a4a5367 commit 2653b8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/e2e/settings/ingress_class.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ var _ = framework.IngressNginxDescribe("[Flag] ingress-class", func() {

ginkgo.It("should watch Ingress with matched Ingress.Spec.IngressClassName and CLI parameter --ingress-class", func() {
validHost := "validhostnameforingressclassname"
testIngressClassName := "test-new-ingress-class"
testIngressClassName := "testclass"

ing := framework.NewSingleIngress(validHost, "/", validHost, f.Namespace, framework.EchoService, 80, nil)
ing.Spec.IngressClassName = &testIngressClassName
Expand All @@ -666,9 +666,10 @@ var _ = framework.IngressNginxDescribe("[Flag] ingress-class", func() {

ginkgo.It("should ignore Ingress with only IngressClassName", func() {
invalidHost := "noclassforyou"
unmatchedIngressClassName := "testclass-unmatched"

ing := framework.NewSingleIngress(invalidHost, "/", invalidHost, f.Namespace, framework.EchoService, 80, nil)
ing.Spec.IngressClassName = &invalidHost
ing.Spec.IngressClassName = &unmatchedIngressClassName
f.EnsureIngress(ing)

f.WaitForNginxConfiguration(func(cfg string) bool {
Expand Down

0 comments on commit 2653b8e

Please sign in to comment.