Skip to content

Commit 4a8d3c8

Browse files
committed
resolve comments
1 parent de499ee commit 4a8d3c8

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

test/conformance/apisix/suite_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
package conformance
1313

1414
import (
15-
"cmp"
1615
"context"
1716
"fmt"
1817
"os"
@@ -161,7 +160,7 @@ func TestMain(m *testing.M) {
161160
Namespace: namespace,
162161
StatusAddress: address,
163162
InitSyncDelay: 1 * time.Minute,
164-
ProviderType: cmp.Or(framework.ProviderType, "apisix-standalone"),
163+
ProviderType: framework.ProviderType,
165164
ProviderSyncPeriod: 10 * time.Millisecond,
166165
})
167166

test/e2e/framework/apisix_consts.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package framework
1414

1515
import (
16+
"cmp"
1617
_ "embed"
1718
"os"
1819
"text/template"
@@ -21,11 +22,11 @@ import (
2122
)
2223

2324
var (
24-
ProviderType = os.Getenv("PROVIDER_TYPE")
25+
ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix-standalone")
2526
)
2627

2728
var (
28-
//go:embed manifests/apisix-standalone.yaml
29+
//go:embed manifests/apisix.yaml
2930
apisixStandaloneTemplate string
3031
APISIXStandaloneTpl *template.Template
3132

test/e2e/scaffold/apisix_deployer.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ package scaffold
1414

1515
import (
1616
"bytes"
17-
"cmp"
1817
"fmt"
1918
"os"
2019
"time"
@@ -180,7 +179,7 @@ func (s *APISIXDeployer) newAPISIXTunnels(serviceName string) error {
180179

181180
func (s *APISIXDeployer) deployDataplane(opts *APISIXDeployOptions) *corev1.Service {
182181
if opts.ServiceName == "" {
183-
opts.ServiceName = "apisix-standalone"
182+
opts.ServiceName = framework.ProviderType
184183
}
185184

186185
if opts.ServiceHTTPPort == 0 {
@@ -195,7 +194,6 @@ func (s *APISIXDeployer) deployDataplane(opts *APISIXDeployOptions) *corev1.Serv
195194
kubectlOpts := k8s.NewKubectlOptions("", "", opts.Namespace)
196195

197196
if framework.ProviderType == adc.BackendModeAPISIX {
198-
opts.ServiceName = "apisix"
199197
opts.ConfigProvider = "etcd"
200198
// deploy etcd
201199
k8s.KubectlApplyFromString(s.GinkgoT, kubectlOpts, framework.EtcdSpec)
@@ -236,7 +234,7 @@ func (s *APISIXDeployer) deployDataplane(opts *APISIXDeployOptions) *corev1.Serv
236234
func (s *APISIXDeployer) DeployIngress() {
237235
s.Framework.DeployIngress(framework.IngressDeployOpts{
238236
ControllerName: s.opts.ControllerName,
239-
ProviderType: cmp.Or(framework.ProviderType, "apisix-standalone"),
237+
ProviderType: framework.ProviderType,
240238
ProviderSyncPeriod: 200 * time.Millisecond,
241239
Namespace: s.namespace,
242240
Replicas: 1,
@@ -246,7 +244,7 @@ func (s *APISIXDeployer) DeployIngress() {
246244
func (s *APISIXDeployer) ScaleIngress(replicas int) {
247245
s.Framework.DeployIngress(framework.IngressDeployOpts{
248246
ControllerName: s.opts.ControllerName,
249-
ProviderType: cmp.Or(framework.ProviderType, "apisix-standalone"),
247+
ProviderType: framework.ProviderType,
250248
ProviderSyncPeriod: 200 * time.Millisecond,
251249
Namespace: s.namespace,
252250
Replicas: replicas,

0 commit comments

Comments
 (0)