Skip to content

Commit 2f83463

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent 9be870e commit 2f83463

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

test/e2e/crds/v2/status.go

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package v2
1919

2020
import (
2121
"fmt"
22+
"log"
2223
"os"
2324
"time"
2425

@@ -101,16 +102,31 @@ spec:
101102
Expect(err).NotTo(HaveOccurred(), "creating ApisixRoute with valid plugin")
102103

103104
By("check ApisixRoute status")
104-
s.RetryAssertion(func() string {
105-
output, _ := s.GetOutputFromString("ar", "default", "-o", "yaml")
106-
return output
107-
}).Should(
108-
And(
109-
ContainSubstring(`status: "False"`),
110-
ContainSubstring(`reason: SyncFailed`),
111-
ContainSubstring(`unknown plugin [non-existent-plugin]`),
112-
),
113-
)
105+
if os.Getenv("PROVIDER_TYPE") == "apisix" {
106+
s.RetryAssertion(func() string {
107+
output, _ := s.GetOutputFromString("ar", "default", "-o", "yaml")
108+
log.Printf("output: %s", output)
109+
return output
110+
}).Should(
111+
And(
112+
ContainSubstring(`status: "False"`),
113+
ContainSubstring(`reason: SyncFailed`),
114+
ContainSubstring(`unknown plugin [non-existent-plugin]`),
115+
),
116+
)
117+
} else {
118+
s.RetryAssertion(func() string {
119+
output, _ := s.GetOutputFromString("ar", "default", "-o", "yaml")
120+
log.Printf("output: %s", output)
121+
return output
122+
}).Should(
123+
And(
124+
ContainSubstring(`status: "False"`),
125+
ContainSubstring(`reason: SyncFailed`),
126+
ContainSubstring(`(non-existent-plugin) not found`),
127+
),
128+
)
129+
}
114130

115131
By("Update ApisixRoute")
116132
applier.MustApplyAPIv2(types.NamespacedName{Namespace: s.Namespace(), Name: "default"}, &apiv2.ApisixRoute{}, ar)
@@ -125,6 +141,9 @@ spec:
125141
})
126142

127143
It("dataplane unavailable", func() {
144+
if os.Getenv("PROVIDER_TYPE") == "api7ee" {
145+
Skip("skip for api7ee mode because it use dashboard admin api")
146+
}
128147
By("apply ApisixRoute")
129148
applier.MustApplyAPIv2(types.NamespacedName{Namespace: s.Namespace(), Name: "default"}, &apiv2.ApisixRoute{}, ar)
130149

@@ -290,6 +309,9 @@ spec:
290309
})
291310

292311
It("dataplane unavailable", func() {
312+
if os.Getenv("PROVIDER_TYPE") == "api7ee" {
313+
Skip("skip for api7ee mode because it use dashboard admin api")
314+
}
293315
By("Create HTTPRoute")
294316
err := s.CreateResourceFromString(httproute)
295317
Expect(err).NotTo(HaveOccurred(), "creating HTTPRoute")

0 commit comments

Comments
 (0)