@@ -107,9 +107,6 @@ spec:
107107 Expect (gwyaml ).To (ContainSubstring (`status: "True"` ), "checking Gateway condition status" )
108108 Expect (gwyaml ).To (ContainSubstring ("message: the gateway has been accepted by the apisix-ingress-controller" ), "checking Gateway condition message" )
109109 })
110- AfterEach (func () {
111- _ = s .DeleteResource ("Gateway" , "apisix" )
112- })
113110
114111 FIt ("dataplane unavailable" , func () {
115112 if os .Getenv ("PROVIDER_TYPE" ) == adc .BackendModeAPI7EE {
@@ -135,8 +132,13 @@ spec:
135132 err = yaml .Unmarshal ([]byte (serviceYaml ), & k8sservice )
136133 Expect (err ).NotTo (HaveOccurred (), "unmarshalling service" )
137134 oldSpec := k8sservice .Spec
138- k8sservice .Spec .Selector = map [string ]string {
139- "app.kubernetes.io/name" : "nonexistent" ,
135+ if os .Getenv ("PROVIDER_TYPE" ) == adc .BackendModeAPISIX {
136+ k8sservice .Spec .Selector = map [string ]string {
137+ "app.kubernetes.io/name" : "nonexistent" ,
138+ }
139+ } else {
140+ k8sservice .Spec .Type = corev1 .ServiceTypeExternalName
141+ k8sservice .Spec .ExternalName = "invalid.host"
140142 }
141143 newServiceYaml , err := yaml .Marshal (k8sservice )
142144 Expect (err ).NotTo (HaveOccurred (), "marshalling service" )
0 commit comments