@@ -25,40 +25,10 @@ import (
2525 . "github.com/onsi/ginkgo/v2"
2626 . "github.com/onsi/gomega"
2727
28+ "github.com/apache/apisix-ingress-controller/test/e2e/framework"
2829 "github.com/apache/apisix-ingress-controller/test/e2e/scaffold"
2930)
3031
31- const gatewayProxyYaml = `
32- apiVersion: apisix.apache.org/v1alpha1
33- kind: GatewayProxy
34- metadata:
35- name: apisix-proxy-config
36- namespace: default
37- spec:
38- provider:
39- type: ControlPlane
40- controlPlane:
41- endpoints:
42- - %s
43- auth:
44- type: AdminKey
45- adminKey:
46- value: "%s"
47- `
48-
49- const ingressClassYaml = `
50- apiVersion: networking.k8s.io/v1beta1
51- kind: IngressClass
52- metadata:
53- name: apisix
54- spec:
55- controller: "apisix.apache.org/apisix-ingress-controller"
56- parameters:
57- apiGroup: "apisix.apache.org"
58- kind: "GatewayProxy"
59- name: "apisix-proxy-config"
60- `
61-
6232var _ = Describe ("Test GlobalRule" , Label ("apisix.apache.org" , "v2" , "apisixglobalrule" ), func () {
6333 s := scaffold .NewScaffold (& scaffold.Options {
6434 ControllerName : "apisix.apache.org/apisix-ingress-controller" ,
9363 time .Sleep (5 * time .Second )
9464
9565 By ("create IngressClass" )
96- err = s .CreateResourceFromStringWithNamespace (ingressClassYaml , "" )
66+ ingressClass := fmt .Sprintf (ingressClassYaml , framework .IngressVersion )
67+ err = s .CreateResourceFromStringWithNamespace (ingressClass , "" )
9768 Expect (err ).NotTo (HaveOccurred (), "creating IngressClass" )
9869 time .Sleep (5 * time .Second )
9970
0 commit comments