Skip to content

Commit ad0c5ba

Browse files
committed
fix test cases manually
1 parent 68a8d8a commit ad0c5ba

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/e2e/crds/gatewayproxy.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"context"
2222
"fmt"
2323
"net/http"
24-
"strings"
2524
"time"
2625

2726
"github.com/gruntwork-io/terratest/modules/k8s"
@@ -134,7 +133,7 @@ spec:
134133
`
135134
BeforeEach(func() {
136135
By("create GatewayProxy")
137-
if strings.Contains(s.Deployer.GetAdminEndpoint(), "api7ee3-dashboard") {
136+
if s.Deployer.Name() == "api7ee" {
138137
err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxySpecAPI7, s.Deployer.GetAdminEndpoint(), s.AdminKey()))
139138
} else {
140139
err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxySpec, framework.ProviderType, s.AdminKey()))
@@ -163,6 +162,10 @@ spec:
163162

164163
Context("Test GatewayProxy update configs", func() {
165164
It("scaling apisix pods to test that the controller watches endpoints", func() {
165+
if s.Deployer.Name() == "api7ee" {
166+
Skip("this case only for apisix/apisix-standalone mode")
167+
}
168+
166169
By("scale apisix to replicas 2")
167170
s.Deployer.DeployDataplane(scaffold.DeployDataplaneOptions{
168171
Replicas: ptr.To(2),

test/e2e/gatewayapi/httproute.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ spec:
7575
value: "%s"
7676
`
7777
getGatewayProxySpec := func() string {
78-
if adminEndpoint := s.Deployer.GetAdminEndpoint(); strings.Contains(adminEndpoint, "api7ee3-dashboard") {
79-
return fmt.Sprintf(gatewayProxyYamlAPI7, adminEndpoint, s.AdminKey())
78+
if s.Deployer.Name() == "api7ee" {
79+
return fmt.Sprintf(gatewayProxyYamlAPI7, s.Deployer.GetAdminEndpoint(), s.AdminKey())
8080
}
8181
return fmt.Sprintf(gatewayProxyYaml, framework.ProviderType, s.AdminKey())
8282
}

0 commit comments

Comments
 (0)