@@ -38,6 +38,8 @@ var _ = Describe("Test apisix.apache.org/v2 Status", Label("apisix.apache.org",
3838 var (
3939 s = scaffold .NewScaffold (& scaffold.Options {
4040 ControllerName : "apisix.apache.org/apisix-ingress-controller" ,
41+ // for triggering the sync
42+ SyncPeriod : 3 * time .Second ,
4143 })
4244 applier = framework .NewApplier (s .GinkgoT , s .K8sClient , s .CreateResourceFromString )
4345 )
6567 name: "apisix-proxy-config"
6668`
6769 ingressClass := fmt .Sprintf (ingressClassYaml , framework .IngressVersion , s .Namespace ())
68- err = s .CreateResourceFromString (ingressClass )
70+ err = s .CreateResourceFromStringWithNamespace (ingressClass , "" )
6971 Expect (err ).NotTo (HaveOccurred (), "creating IngressClass" )
7072 time .Sleep (5 * time .Second )
7173 })
@@ -156,8 +158,8 @@ spec:
156158 })
157159
158160 It ("dataplane unavailable" , func () {
159- if os .Getenv ("PROVIDER_TYPE" ) != framework .ProviderTypeAPISIXStandalone {
160- Skip ("only for apisix standalone mode" )
161+ if os .Getenv ("PROVIDER_TYPE" ) != framework .ProviderTypeAPI7EE {
162+ Skip ("skip for api7ee mode because it use dashboard admin api " )
161163 }
162164 By ("apply ApisixRoute" )
163165 applier .MustApplyAPIv2 (types.NamespacedName {Namespace : s .Namespace (), Name : "default" }, & apiv2.ApisixRoute {}, ar )
@@ -191,12 +193,13 @@ spec:
191193 s .RetryAssertion (func () string {
192194 output , _ := s .GetOutputFromString ("ar" , "default" , "-o" , "yaml" )
193195 return output
194- }).Should (
195- And (
196- ContainSubstring (`status: "False"` ),
197- ContainSubstring (`reason: SyncFailed` ),
198- ),
199- )
196+ }).WithTimeout (60 * time .Second ).
197+ Should (
198+ And (
199+ ContainSubstring (`status: "False"` ),
200+ ContainSubstring (`reason: SyncFailed` ),
201+ ),
202+ )
200203
201204 By ("update service to original spec" )
202205 serviceYaml , err = s .GetOutputFromString ("svc" , framework .ProviderType , "-o" , "yaml" )
@@ -213,12 +216,13 @@ spec:
213216 s .RetryAssertion (func () string {
214217 output , _ := s .GetOutputFromString ("ar" , "default" , "-o" , "yaml" )
215218 return output
216- }).Should (
217- And (
218- ContainSubstring (`status: "True"` ),
219- ContainSubstring (`reason: Accepted` ),
220- ),
221- )
219+ }).WithTimeout (60 * time .Second ).
220+ Should (
221+ And (
222+ ContainSubstring (`status: "True"` ),
223+ ContainSubstring (`reason: Accepted` ),
224+ ),
225+ )
222226
223227 By ("check route in APISIX" )
224228 s .RequestAssert (& scaffold.RequestAssert {
0 commit comments