File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff 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 ),
Original file line number Diff line number Diff line change 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 }
You can’t perform that action at this time.
0 commit comments