Skip to content

Commit 2527285

Browse files
committed
fix: r
Signed-off-by: ashing <axingfly@gmail.com>
1 parent 030a261 commit 2527285

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/e2e/gatewayapi/gatewayproxy.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
. "github.com/onsi/ginkgo/v2"
99
. "github.com/onsi/gomega"
1010

11+
"github.com/api7/api7-ingress-controller/test/e2e/framework"
1112
"github.com/api7/api7-ingress-controller/test/e2e/scaffold"
1213
)
1314

@@ -60,6 +61,15 @@ kind: GatewayProxy
6061
metadata:
6162
name: api7-proxy-config
6263
spec:
64+
provider:
65+
type: ControlPlane
66+
controlPlane:
67+
endpoints:
68+
- %s
69+
auth:
70+
type: AdminKey
71+
adminKey:
72+
value: "%s"
6373
plugins:
6474
- name: response-rewrite
6575
enabled: true
@@ -178,7 +188,7 @@ spec:
178188
Expect(gcYaml).To(ContainSubstring("message: the gatewayclass has been accepted by the api7-ingress-controller"), "checking GatewayClass condition message")
179189

180190
By("Create GatewayProxy with enabled plugin")
181-
err = s.CreateResourceFromString(gatewayProxyWithEnabledPlugin)
191+
err = s.CreateResourceFromString(fmt.Sprintf(gatewayProxyWithEnabledPlugin, framework.DashboardTLSEndpoint, s.AdminKey()))
182192
Expect(err).NotTo(HaveOccurred(), "creating GatewayProxy with enabled plugin")
183193
time.Sleep(5 * time.Second)
184194

@@ -196,7 +206,7 @@ spec:
196206

197207
AfterEach(func() {
198208
By("Clean up resources")
199-
_ = s.DeleteResourceFromString(gatewayProxyWithEnabledPlugin)
209+
_ = s.DeleteResourceFromString(fmt.Sprintf(gatewayProxyWithEnabledPlugin, framework.DashboardTLSEndpoint, s.AdminKey()))
200210
_ = s.DeleteResourceFromString(fmt.Sprintf(httpRouteForTest, "api7"))
201211
_ = s.DeleteResourceFromString(fmt.Sprintf(gatewayWithProxy, gatewayClassName))
202212
})

0 commit comments

Comments
 (0)