Skip to content

Commit 53bff8a

Browse files
committed
skip test suite
1 parent d83f893 commit 53bff8a

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tests/suite/session_persistence_test.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ var _ = Describe("SessionPersistence Plus", Ordered, Label("functional", "sessio
223223

224224
Context("verify working traffic", func() {
225225
It("should return 200 responses from the same backend for HTTPRoutes `coffee` and `tea`", func() {
226+
if !*plusEnabled {
227+
Skip("Skipping Session Persistence Plus tests on NGINX OSS deployment")
228+
}
226229
Eventually(
227230
func() error {
228231
return expectRequestToSucceedAndReuseCookie(baseCoffeeURL, address, "URI: /coffee", 11)
@@ -252,11 +255,14 @@ var _ = Describe("SessionPersistence Plus", Ordered, Label("functional", "sessio
252255

253256
DescribeTable("are set properly for",
254257
func(expCfgs []framework.ExpectedNginxField) {
258+
if !*plusEnabled {
259+
Skip("Skipping Session Persistence Plus tests on NGINX OSS deployment")
260+
}
255261
for _, expCfg := range expCfgs {
256262
Expect(framework.ValidateNginxFieldExists(conf, expCfg)).To(Succeed())
257263
}
258264
},
259-
Entry("HTTP upstream", []framework.ExpectedNginxField{
265+
Entry("HTTP upstreams", []framework.ExpectedNginxField{
260266
{
261267
Directive: "upstream",
262268
Value: "session-persistence-plus_coffee_80_coffee_session-persistence-plus_0",
@@ -322,12 +328,18 @@ var _ = Describe("SessionPersistence Plus", Ordered, Label("functional", "sessio
322328
})
323329

324330
It("HTTPRoute reports the errors in its status", func() {
331+
if !*plusEnabled {
332+
Skip("Skipping Session Persistence Plus tests on NGINX OSS deployment")
333+
}
325334
routeNsName := types.NamespacedName{Name: "route-invalid-sp", Namespace: namespace}
326335
err := waitForHTTPRouteToHaveErrorMessage(routeNsName)
327336
Expect(err).ToNot(HaveOccurred(), "expected route to report invalid session persistence configuration")
328337
})
329338

330339
It("GRPCRoute reports the errors in its status", func() {
340+
if !*plusEnabled {
341+
Skip("Skipping Session Persistence Plus tests on NGINX OSS deployment")
342+
}
331343
routeNsName := types.NamespacedName{Name: "grpc-route-invalid-sp", Namespace: namespace}
332344
err := waitForGRPCRouteToHaveErrorMessage(routeNsName)
333345
Expect(err).ToNot(HaveOccurred(), "expected route to report invalid session persistence configuration")

tests/suite/system_suite_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ func setup(cfg setupConfig, extraInstallArgs ...string) {
178178

179179
installCfg := createNGFInstallConfig(cfg, extraInstallArgs...)
180180

181-
if !installCfg.Plus && strings.Contains(GinkgoLabelFilter(), "session-persistence-plus") {
182-
Skip("Skipping Session Persistence Plus tests on NGINX OSS deployment")
183-
}
184-
185181
podNames, err := resourceManager.GetReadyNGFPodNames(
186182
installCfg.Namespace,
187183
installCfg.ReleaseName,

0 commit comments

Comments
 (0)