Skip to content

Commit 7f91cbe

Browse files
committed
update
1 parent 00e3108 commit 7f91cbe

File tree

11 files changed

+18
-161
lines changed

11 files changed

+18
-161
lines changed

internal/adc/cache/store.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ func (s *Store) Delete(name string, resourceTypes []string, Labels map[string]st
194194
if err != nil {
195195
log.Errorw("failed to list global rules", zap.Error(err))
196196
}
197-
log.Infow("deleting global rules", zap.Any("globalRules", globalRules))
198197
for _, globalRule := range globalRules {
199198
if err := targetCache.DeleteGlobalRule(globalRule); err != nil {
200199
log.Errorw("failed to delete global rule", zap.Error(err), zap.String("global rule", globalRule.ID))

internal/adc/translator/handler.go

Lines changed: 0 additions & 139 deletions
This file was deleted.

internal/adc/translator/translator.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,18 @@
1818
package translator
1919

2020
import (
21-
"reflect"
22-
2321
"github.com/go-logr/logr"
2422

2523
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
2624
)
2725

2826
type Translator struct {
2927
Log logr.Logger
30-
31-
register map[reflect.Type]ResourceHandler
3228
}
3329

3430
func NewTranslator(log logr.Logger) *Translator {
3531
return &Translator{
36-
Log: log,
37-
register: make(map[reflect.Type]ResourceHandler),
32+
Log: log,
3833
}
3934
}
4035

test/e2e/crds/v1alpha1/consumer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ spec:
600600
})
601601

602602
It("Should sync Consumer during startup", func() {
603-
if s.Deployer.Name() == framework.BackendModeAPI7EE {
603+
if s.Deployer.Name() == framework.ProviderTypeAPI7EE {
604604
Skip("skipping test in API7EE mode")
605605
}
606606
Expect(s.CreateResourceFromString(consumer2)).NotTo(HaveOccurred(), "creating unused consumer")

test/e2e/crds/v1alpha1/gatewayproxy.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ spec:
132132
`
133133
BeforeEach(func() {
134134
By("create GatewayProxy")
135-
if s.Deployer.Name() == framework.BackendModeAPI7EE {
135+
if s.Deployer.Name() == framework.ProviderTypeAPI7EE {
136136
err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxySpecAPI7, s.Deployer.GetAdminEndpoint(), s.AdminKey()))
137137
} else {
138138
err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxySpec, framework.ProviderType, s.AdminKey()))
@@ -160,8 +160,8 @@ spec:
160160
})
161161

162162
Context("Test GatewayProxy update configs", func() {
163-
It("scaling apisix pods to test that the controller watches endpoints", func() {
164-
if s.Deployer.Name() == framework.BackendModeAPI7EE {
163+
FIt("scaling apisix pods to test that the controller watches endpoints", func() {
164+
if s.Deployer.Name() == framework.ProviderTypeAPI7EE {
165165
Skip("this case only for apisix/apisix-standalone mode")
166166
}
167167

@@ -207,7 +207,7 @@ spec:
207207
keyword string
208208
)
209209

210-
if framework.ProviderType == framework.BackendModeAPI7EE {
210+
if framework.ProviderType == framework.ProviderTypeAPI7EE {
211211
keyword = fmt.Sprintf(`{"config.ServerAddrs": ["%s"]}`, s.Deployer.GetAdminEndpoint())
212212
} else {
213213
keyword = fmt.Sprintf(`{"config.ServerAddrs": ["http://%s:9180"]}`, s.GetPodIP(s.Namespace(), "app.kubernetes.io/name=apisix"))

test/e2e/crds/v2/route.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ spec:
239239
})
240240

241241
It("Test ApisixRoute filterFunc", func() {
242-
if s.Deployer.Name() == framework.BackendModeAPI7EE {
242+
if s.Deployer.Name() == framework.ProviderTypeAPI7EE {
243243
Skip("filterFunc is not supported in api7ee")
244244
}
245245
const apisixRouteSpec = `
@@ -726,7 +726,7 @@ spec:
726726
servicePort: 80
727727
`
728728
It("Should sync ApisixRoute during startup", func() {
729-
if s.Deployer.Name() == framework.BackendModeAPI7EE {
729+
if s.Deployer.Name() == framework.ProviderTypeAPI7EE {
730730
Skip("skipping test in API7EE mode")
731731
}
732732
By("apply ApisixRoute")

test/e2e/crds/v2/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ spec:
155155
})
156156
})
157157

158-
It("dataplane unavailable", func() {
159-
if os.Getenv("PROVIDER_TYPE") == framework.BackendModeAPI7EE {
158+
FIt("dataplane unavailable", func() {
159+
if os.Getenv("PROVIDER_TYPE") != framework.ProviderTypeAPISIXStandalone {
160160
Skip("skip for api7ee mode because it use dashboard admin api")
161161
}
162162
By("apply ApisixRoute")

test/e2e/framework/api7_consts.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ const (
3737
)
3838

3939
const (
40-
ProviderAPISIX = "apisix"
41-
BackendModeAPI7EE = "api7ee"
40+
ProviderTypeAPI7EE = "api7ee"
4241
)

test/e2e/framework/apisix_consts.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ import (
2727
)
2828

2929
var (
30-
ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix-standalone")
30+
ProviderTypeAPISIX = "aapisix"
31+
ProviderTypeAPISIXStandalone = "apisix-standalone"
32+
33+
ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), ProviderTypeAPISIXStandalone)
3134
IngressVersion = cmp.Or(os.Getenv("INGRESS_VERSION"), "v1")
3235
)
3336

test/e2e/gatewayapi/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ spec:
110110
_ = s.DeleteResource("Gateway", "apisix")
111111
})
112112

113-
It("dataplane unavailable", func() {
114-
if os.Getenv("PROVIDER_TYPE") == framework.BackendModeAPI7EE {
113+
FIt("dataplane unavailable", func() {
114+
if os.Getenv("PROVIDER_TYPE") != framework.ProviderTypeAPI7EE {
115115
Skip("skip for api7ee mode because it use dashboard admin api")
116116
}
117117
By("Create HTTPRoute")

0 commit comments

Comments
 (0)