Skip to content

Commit

Permalink
add logs for checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Revolyssup committed Jan 31, 2024
1 parent 81943fb commit a28d2af
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
6 changes: 5 additions & 1 deletion test/e2e/suite-chore/consistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,15 @@ var _ = ginkgo.Describe("suite-chore: Consistency between APISIX and the Ingress

s.NewAPISIXClient().GET("/ip").WithHeader("Host", "httpbin.org").Expect().Status(http.StatusOK)
})

if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
ginkgo.It("Ingress V1beta1 and APISIX of route and upstream", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
httpService := fmt.Sprintf(_httpServiceConfig, "port1", 9080, 9080)
assert.Nil(ginkgo.GinkgoT(), s.CreateResourceFromString(httpService))

Expand Down
9 changes: 9 additions & 0 deletions test/e2e/suite-gateway/gateway_tcproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ var _ = ginkgo.Describe("suite-gateway: TCP Route", func() {
}
s := scaffold.NewDefaultScaffold()
ginkgo.It("create TCPRoute", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
backendSvc, backendPorts := s.DefaultHTTPBackend()
tcpRoute := fmt.Sprintf(`
apiVersion: gateway.networking.k8s.io/v1alpha2
Expand All @@ -57,6 +60,9 @@ spec:
})

ginkgo.It("update TCPRoute", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
backendSvc, backendPorts := s.DefaultHTTPBackend()
tcpRoute := fmt.Sprintf(`
apiVersion: gateway.networking.k8s.io/v1alpha2
Expand Down Expand Up @@ -99,6 +105,9 @@ spec:
})

ginkgo.It("delete TCPRoute", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
backendSvc, backendPorts := s.DefaultHTTPBackend()
tcpRoute := fmt.Sprintf(`
apiVersion: gateway.networking.k8s.io/v1alpha2
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/suite-gateway/gateway_tlsroute.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ var _ = ginkgo.Describe("suite-gateway: TLSRoute", func() {
s := scaffold.NewDefaultScaffold()

ginkgo.It("Basic with 1 Hosts 1 Rule 1 Match 1 BackendRef", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
createSSL(s)

host := "api6.com"
Expand Down Expand Up @@ -175,6 +178,9 @@ spec:
})

ginkgo.It("Basic with 2 Hosts 1 Rule 1 Match 1 BackendRef", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
createSSL(s)

host := "api6.com"
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/suite-gateway/gateway_udproute.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ var _ = ginkgo.Describe("suite-gateway: UDP Route", func() {
s := scaffold.NewDefaultScaffold()

ginkgo.It("UDPRoute", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
// setup udp test service
dnsSvc := s.NewCoreDNSService()
route := fmt.Sprintf(`
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/suite-gateway/route_attchment.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ spec:
assert.Nil(ginkgo.GinkgoT(), s.CreateResourceFromString(tcpRoute), "createing tcp route")
assert.Nil(ginkgo.GinkgoT(), s.EnsureNumApisixStreamRoutesCreated(1), "Checking number of routes")
})

if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
ginkgo.It("Gateway Listener hostname match", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
Expand Down
7 changes: 6 additions & 1 deletion test/e2e/suite-ingress/suite-ingress-resource/ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ var _ = ginkgo.Describe("suite-ingress-resource: support ingress.networking/v1be
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
backendSvc, backendPort := s.DefaultHTTPBackend()
ing := fmt.Sprintf(`
apiVersion: networking.k8s.io/v1beta1
Expand Down Expand Up @@ -596,11 +597,15 @@ spec:
// Mismatched host
_ = s.NewAPISIXClient().GET("/status/200").WithHeader("Host", "a.httpbin.org").Expect().Status(http.StatusNotFound)
})

if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
ginkgo.It("path regex match networking.k8s.io/v1beta1", func() {
if os.Getenv("K8s_Version") == "v1.29.0" {
return
}
fmt.Println("K8s_Version", os.Getenv("K8s_Version"))
backendSvc, backendPort := s.DefaultHTTPBackend()
ing := fmt.Sprintf(`
apiVersion: networking.k8s.io/v1beta1
Expand Down

0 comments on commit a28d2af

Please sign in to comment.