Skip to content

Commit edba3ff

Browse files
committed
resolve comment
1 parent 38558c3 commit edba3ff

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

internal/controller/consumer_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (r *ConsumerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
110110
var statusErr error
111111
tctx := provider.NewDefaultTranslateContext()
112112

113-
if err := r.processSepc(ctx, tctx, consumer); err != nil {
113+
if err := r.processSpec(ctx, tctx, consumer); err != nil {
114114
r.Log.Error(err, "failed to process consumer spec", "consumer", consumer)
115115
statusErr = err
116116
}
@@ -127,7 +127,7 @@ func (r *ConsumerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
127127
return ctrl.Result{}, nil
128128
}
129129

130-
func (r *ConsumerReconciler) processSepc(ctx context.Context, tctx *provider.TranslateContext, consumer *v1alpha1.Consumer) error {
130+
func (r *ConsumerReconciler) processSpec(ctx context.Context, tctx *provider.TranslateContext, consumer *v1alpha1.Consumer) error {
131131
for _, credential := range consumer.Spec.Credentials {
132132
if credential.SecretRef == nil {
133133
continue

test/e2e/crds/consumer.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
var _ = Describe("Test Consumer", func() {
1414
s := scaffold.NewDefaultScaffold()
1515

16-
var defautlGatewayClass = `
16+
var defaultGatewayClass = `
1717
apiVersion: gateway.networking.k8s.io/v1
1818
kind: GatewayClass
1919
metadata:
@@ -22,7 +22,7 @@ spec:
2222
controllerName: %s
2323
`
2424

25-
var defautlGateway = `
25+
var defaultGateway = `
2626
apiVersion: gateway.networking.k8s.io/v1
2727
kind: Gateway
2828
metadata:
@@ -78,7 +78,7 @@ spec:
7878
var beforeEachHTTP = func() {
7979
By("create GatewayClass")
8080
gatewayClassName := fmt.Sprintf("api7-%d", time.Now().Unix())
81-
gatewayString := fmt.Sprintf(defautlGatewayClass, gatewayClassName, s.GetControllerName())
81+
gatewayString := fmt.Sprintf(defaultGatewayClass, gatewayClassName, s.GetControllerName())
8282
err := s.CreateResourceFromStringWithNamespace(gatewayString, "")
8383
Expect(err).NotTo(HaveOccurred(), "creating GatewayClass")
8484
time.Sleep(5 * time.Second)
@@ -93,7 +93,7 @@ spec:
9393
)
9494

9595
By("create Gateway")
96-
err = s.CreateResourceFromString(fmt.Sprintf(defautlGateway, gatewayClassName))
96+
err = s.CreateResourceFromString(fmt.Sprintf(defaultGateway, gatewayClassName))
9797
Expect(err).NotTo(HaveOccurred(), "creating Gateway")
9898
time.Sleep(5 * time.Second)
9999

@@ -310,5 +310,12 @@ spec:
310310
})
311311

312312
PContext("SecretRef", func() {
313+
PIT("key-auth", func() {
314+
})
315+
PIT("basic-auth", func() {
316+
})
317+
PIT("cross namespace", func() {
318+
})
319+
313320
})
314321
})

0 commit comments

Comments
 (0)