From bab7280b50d1d09bb75d993b78635677418b70e9 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 81301c19f8..9b0f6b73da 100644 --- a/test/integration/version_test.go +++ b/test/integration/version_test.go @@ -16,6 +16,7 @@ import ( "github.com/kong/kubernetes-ingress-controller/v3/test" "github.com/kong/kubernetes-ingress-controller/v3/test/consts" "github.com/kong/kubernetes-ingress-controller/v3/test/internal/helpers" + "github.com/kong/kubernetes-ingress-controller/v3/test/internal/testenv" ) func RunWhenKongVersion(t *testing.T, vRangeStr string, msg ...any) { @@ -55,6 +56,10 @@ func RunWhenKongDBMode(t *testing.T, dbmode dpconf.DBMode, 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() {