From a1a04ea0b611e5400c4fd76b05abbda259d951b8 Mon Sep 17 00:00:00 2001 From: Tao Yi Date: Thu, 16 Nov 2023 19:26:42 +0800 Subject: [PATCH] skip enterprise tests when image is enterprise but TEST_KONG_ENTERPRISE not enabled (#5165) --- test/integration/version_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/integration/version_test.go b/test/integration/version_test.go index 189a8c0c3a..19efaa45fe 100644 --- a/test/integration/version_test.go +++ b/test/integration/version_test.go @@ -13,6 +13,7 @@ import ( "github.com/kong/kubernetes-ingress-controller/v2/test/consts" "github.com/kong/kubernetes-ingress-controller/v2/test/internal/helpers" + "github.com/kong/kubernetes-ingress-controller/v2/test/internal/testenv" ) func RunWhenKongVersion(t *testing.T, vRangeStr string, msg ...any) { @@ -52,6 +53,10 @@ func RunWhenKongDBMode(t *testing.T, dbmode string, msg ...any) { func RunWhenKongEnterprise(t *testing.T) { t.Helper() + if !testenv.KongEnterpriseEnabled() { + t.Skipf("skipping because Kong enterprise is not enabled") + } + version := eventuallyGetKongVersion(t, proxyAdminURL) if !version.IsKongGatewayEnterprise() {