Repository: kumahq/kuma
Pull request #2425 (2021-07-25 23:01:15)

chore(ci) clean up Ginkgo test initialization (backport #2419)
This is an automatic backport of pull request #2419 done by [Mergify](https://mergify.io).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.io/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.io/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/
</details>



Patch:
diff --git a/pkg/core/xds/v2/context.go b/pkg/core/xds/v2/context.go
deleted file mode 100644
index 1bdbdbafd..000000000
--- a/pkg/core/xds/v2/context.go
+++ /dev/null
@@ -1,67 +0,0 @@
-package v2
-
-import (
-	envoy_core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
-	envoy_cache "github.com/envoyproxy/go-control-plane/pkg/cache/v2"
-	envoy_log "github.com/envoyproxy/go-control-plane/pkg/log"
-	"github.com/go-logr/logr"
-
-	"github.com/kumahq/kuma/pkg/core"
-	"github.com/kumahq/kuma/pkg/core/xds"
-	util_xds "github.com/kumahq/kuma/pkg/util/xds"
-)
-
-type XdsContext interface {
-	Hasher() envoy_cache.NodeHash
-	Cache() envoy_cache.SnapshotCache
-}
-
-func NewXdsContext() XdsContext {
-	return newXdsContext("xds-server", true)
-}
-
-func newXdsContext(name string, ads bool) XdsContext {
-	log := core.Log.WithName(name)
-	hasher := hasher{log}
-	logger := util_xds.NewLogger(log)
-	cache := envoy_cache.NewSnapshotCache(ads, hasher, logger)
-	return &xdsContext{
-		NodeHash:      hasher,
-		Logger:        logger,
-		SnapshotCache: cache,
-	}
-}
-
-var _ XdsContext = &xdsContext{}
-
-type xdsContext struct {
-	envoy_cache.NodeHash
-	envoy_log.Logger
-	envoy_cache.SnapshotCache
-}
-
-func (c *xdsContext) Hasher() envoy_cache.NodeHash {
-	return c.NodeHash
-}
-
-func (c *xdsContext) Cache() envoy_cache.SnapshotCache {
-	return c.SnapshotCache
-}
-
-var _ envoy_cache.NodeHash = &hasher{}
-
-type hasher struct {
-	log logr.Logger
-}
-
-func (h hasher) ID(node *envoy_core.Node) string {
-	if node == nil {
-		return "unknown"
-	}
-	proxyId, err := xds.ParseProxyIdFromString(node.GetId())
-	if err != nil {
-		h.log.Error(err, "failed to parse Proxy ID", "node", node)
-		return "unknown"
-	}
-	return proxyId.String()
-}
diff --git a/pkg/xds/server/v3/components.go b/pkg/xds/server/v3/components.go
index e00a98ddd..59b4da932 100644
--- a/pkg/xds/server/v3/components.go
+++ b/pkg/xds/server/v3/components.go
@@ -11,7 +11,6 @@ import (
 	"github.com/kumahq/kuma/pkg/core"
 	core_model "github.com/kumahq/kuma/pkg/core/resources/model"
 	core_runtime "github.com/kumahq/kuma/pkg/core/runtime"
-	v3 "github.com/kumahq/kuma/pkg/core/xds/v3"
 	util_xds "github.com/kumahq/kuma/pkg/util/xds"
 	util_xds_v3 "github.com/kumahq/kuma/pkg/util/xds/v3"
 	"github.com/kumahq/kuma/pkg/xds/auth"
@@ -35,7 +34,7 @@ func RegisterXDS(
 	envoyCpCtx *xds_context.ControlPlaneContext,
 	rt core_runtime.Runtime,
 ) error {
-	xdsContext := v3.NewXdsContext()
+	xdsContext := NewXdsContext()
 
 	authenticator, err := auth_components.DefaultAuthenticator(rt)
 	if err != nil {
@@ -72,7 +71,7 @@ func RegisterXDS(
 	return nil
 }
 
-func DefaultReconciler(rt core_runtime.Runtime, xdsContext v3.XdsContext) xds_sync.SnapshotReconciler {
+func DefaultReconciler(rt core_runtime.Runtime, xdsContext XdsContext) xds_sync.SnapshotReconciler {
 	resolver := xds_template.SequentialResolver(
 		&xds_template.SimpleProxyTemplateResolver{
 			ReadOnlyResourceManager: rt.ReadOnlyResourceManager(),
@@ -89,7 +88,7 @@ func DefaultReconciler(rt core_runtime.Runtime, xdsContext v3.XdsContext) xds_sy
 	}
 }
 
-func DefaultIngressReconciler(rt core_runtime.Runtime, xdsContext v3.XdsContext) xds_sync.SnapshotReconciler {
+func DefaultIngressReconciler(rt core_runtime.Runtime, xdsContext XdsContext) xds_sync.SnapshotReconciler {
 	resolver := &xds_template.StaticProxyTemplateResolver{
 		Template: &mesh_proto.ProxyTemplate{
 			Conf: &mesh_proto.ProxyTemplate_Conf{


Test patch:
diff --git a/api/mesh/v1alpha1/v1alpha1_suite_test.go b/api/mesh/v1alpha1/v1alpha1_suite_test.go
index 090a64720..f921a0542 100644
--- a/api/mesh/v1alpha1/v1alpha1_suite_test.go
+++ b/api/mesh/v1alpha1/v1alpha1_suite_test.go
@@ -8,6 +8,6 @@ import (
 )
 
 func TestV1alpha1(t *testing.T) {
-	RegisterFailHandler(Fail)
+	RegisterFailHandlerWithT(t, Fail)
 	RunSpecs(t, "V1alpha1 Suite")
 }
diff --git a/api/observability/v1/v1_suite_test.go b/api/observability/v1/v1_suite_test.go
index 914079324..bb60b71b0 100644
--- a/api/observability/v1/v1_suite_test.go
+++ b/api/observability/v1/v1_suite_test.go
@@ -8,6 +8,6 @@ import (
 )
 
 func TestV1alpha1(t *testing.T) {
-	RegisterFailHandler(Fail)
+	RegisterFailHandlerWithT(t, Fail)
 	RunSpecs(t, "v1 Suite")
 }
diff --git a/api/observability/v1alpha1/v1alpha1_suite_test.go b/api/observability/v1alpha1/v1alpha1_suite_test.go
index 090a64720..f921a0542 100644
--- a/api/observability/v1alpha1/v1alpha1_suite_test.go
+++ b/api/observability/v1alpha1/v1alpha1_suite_test.go
@@ -8,6 +8,6 @@ import (
 )
 
 func TestV1alpha1(t *testing.T) {
-	RegisterFailHandler(Fail)
+	RegisterFailHandlerWithT(t, Fail)
 	RunSpecs(t, "V1alpha1 Suite")
 }
diff --git a/api/system/v1alpha1/v1alpha1_suite_test.go b/api/system/v1alpha1/v1alpha1_suite_test.go
index 090a64720..f921a0542 100644
--- a/api/system/v1alpha1/v1alpha1_suite_test.go
+++ b/api/system/v1alpha1/v1alpha1_suite_test.go
@@ -8,6 +8,6 @@ import (
 )
 
 func TestV1alpha1(t *testing.T) {
-	RegisterFailHandler(Fail)
+	RegisterFailHandlerWithT(t, Fail)
 	RunSpecs(t, "V1alpha1 Suite")
 }
diff --git a/app/kuma-cp/cmd/cmd_suite_test.go b/app/kuma-cp/cmd/cmd_suite_test.go
index 52fb4520c..eaa03663c 100644
--- a/app/kuma-cp/cmd/cmd_suite_test.go
+++ b/app/kuma-cp/cmd/cmd_suite_test.go
@@ -19,21 +19,9 @@ package cmd
 import (
 	"testing"
 
-	"github.com/go-logr/logr"
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "CMD Suite")
+	test.RunSpecs(t, "CMD Suite")
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/app/kuma-dp/cmd/cmd_suite_test.go b/app/kuma-dp/cmd/cmd_suite_test.go
index 22d1c5779..ffda82345 100644
--- a/app/kuma-dp/cmd/cmd_suite_test.go
+++ b/app/kuma-dp/cmd/cmd_suite_test.go
@@ -3,11 +3,9 @@ package cmd_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cmd Suite")
+	test.RunSpecs(t, "Cmd Suite")
 }
diff --git a/app/kuma-dp/pkg/config/config_suite_test.go b/app/kuma-dp/pkg/config/config_suite_test.go
index ddc35f3ff..6ed91e3fe 100644
--- a/app/kuma-dp/pkg/config/config_suite_test.go
+++ b/app/kuma-dp/pkg/config/config_suite_test.go
@@ -3,11 +3,9 @@ package config_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestConfig(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Kuma DP Config Suite")
+	test.RunSpecs(t, "Kuma DP Config Suite")
 }
diff --git a/app/kuma-dp/pkg/dataplane/accesslogs/v3/accesslogs_suite_test.go b/app/kuma-dp/pkg/dataplane/accesslogs/v3/accesslogs_suite_test.go
index 4feac8e30..6fab9b01e 100644
--- a/app/kuma-dp/pkg/dataplane/accesslogs/v3/accesslogs_suite_test.go
+++ b/app/kuma-dp/pkg/dataplane/accesslogs/v3/accesslogs_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestAccesslogs(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Accesslogs Suite")
+	test.RunSpecs(t, "Accesslogs Suite")
 }
diff --git a/app/kuma-dp/pkg/dataplane/dnsserver/dnsserver_suite_test.go b/app/kuma-dp/pkg/dataplane/dnsserver/dnsserver_suite_test.go
index 0749ea444..90021bd07 100644
--- a/app/kuma-dp/pkg/dataplane/dnsserver/dnsserver_suite_test.go
+++ b/app/kuma-dp/pkg/dataplane/dnsserver/dnsserver_suite_test.go
@@ -3,11 +3,9 @@ package dnsserver
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestEnvoy(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "DNS Server Suite")
+	test.RunSpecs(t, "DNS Server Suite")
 }
diff --git a/app/kuma-dp/pkg/dataplane/envoy/envoy_suite_test.go b/app/kuma-dp/pkg/dataplane/envoy/envoy_suite_test.go
index 7664d89be..c0dc8d647 100644
--- a/app/kuma-dp/pkg/dataplane/envoy/envoy_suite_test.go
+++ b/app/kuma-dp/pkg/dataplane/envoy/envoy_suite_test.go
@@ -3,11 +3,9 @@ package envoy
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestEnvoy(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Envoy Suite")
+	test.RunSpecs(t, "Envoy Suite")
 }
diff --git a/app/kuma-dp/pkg/dataplane/metrics/metrics_suite_test.go b/app/kuma-dp/pkg/dataplane/metrics/metrics_suite_test.go
index 5e8061b97..3922c73d0 100644
--- a/app/kuma-dp/pkg/dataplane/metrics/metrics_suite_test.go
+++ b/app/kuma-dp/pkg/dataplane/metrics/metrics_suite_test.go
@@ -3,11 +3,9 @@ package metrics
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMetrics(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Metrics Hijacker Suite")
+	test.RunSpecs(t, "Metrics Hijacker Suite")
 }
diff --git a/app/kuma-prometheus-sd/cmd/cmd_suite_test.go b/app/kuma-prometheus-sd/cmd/cmd_suite_test.go
index 22d1c5779..ffda82345 100644
--- a/app/kuma-prometheus-sd/cmd/cmd_suite_test.go
+++ b/app/kuma-prometheus-sd/cmd/cmd_suite_test.go
@@ -3,11 +3,9 @@ package cmd_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cmd Suite")
+	test.RunSpecs(t, "Cmd Suite")
 }
diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1/suite_test.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1/suite_test.go
index 7dfb9f5a9..d3f5a531b 100644
--- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1/suite_test.go
+++ b/app/kuma-prometheus-sd/pkg/discovery/xds/v1/suite_test.go
@@ -3,11 +3,9 @@ package v1_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Prometheus SD V1 Suite")
+	test.RunSpecs(t, "Prometheus SD V1 Suite")
 }
diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go
index 77b56be54..48b6967fd 100644
--- a/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go
+++ b/app/kuma-prometheus-sd/pkg/discovery/xds/v1alpha1/suite_test.go
@@ -3,11 +3,9 @@ package v1alpha1_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Prometheus SD V1Alpha1 Suite")
+	test.RunSpecs(t, "Prometheus SD V1Alpha1 Suite")
 }
diff --git a/app/kuma-prometheus-sd/pkg/discovery/xds/xds_suite_test.go b/app/kuma-prometheus-sd/pkg/discovery/xds/xds_suite_test.go
index 8d5efb824..120947958 100644
--- a/app/kuma-prometheus-sd/pkg/discovery/xds/xds_suite_test.go
+++ b/app/kuma-prometheus-sd/pkg/discovery/xds/xds_suite_test.go
@@ -3,11 +3,9 @@ package xds_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds Suite")
+	test.RunSpecs(t, "Xds Suite")
 }
diff --git a/app/kumactl/cmd/apply/apply_suite_test.go b/app/kumactl/cmd/apply/apply_suite_test.go
index a6b8e146f..c3df4a017 100644
--- a/app/kumactl/cmd/apply/apply_suite_test.go
+++ b/app/kumactl/cmd/apply/apply_suite_test.go
@@ -3,11 +3,9 @@ package apply_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestApplyCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Apply Cmd Suite")
+	test.RunSpecs(t, "Apply Cmd Suite")
 }
diff --git a/app/kumactl/cmd/cmd_suite_test.go b/app/kumactl/cmd/cmd_suite_test.go
index 22d1c5779..ffda82345 100644
--- a/app/kumactl/cmd/cmd_suite_test.go
+++ b/app/kumactl/cmd/cmd_suite_test.go
@@ -3,11 +3,9 @@ package cmd_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cmd Suite")
+	test.RunSpecs(t, "Cmd Suite")
 }
diff --git a/app/kumactl/cmd/completion/completion_suite_test.go b/app/kumactl/cmd/completion/completion_suite_test.go
index f851fd69a..15fe63a96 100644
--- a/app/kumactl/cmd/completion/completion_suite_test.go
+++ b/app/kumactl/cmd/completion/completion_suite_test.go
@@ -3,11 +3,9 @@ package completion_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCompletionCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Completion Cmd Suite")
+	test.RunSpecs(t, "Completion Cmd Suite")
 }
diff --git a/app/kumactl/cmd/config/config_suite_test.go b/app/kumactl/cmd/config/config_suite_test.go
index ad110e7bb..2f10b497b 100644
--- a/app/kumactl/cmd/config/config_suite_test.go
+++ b/app/kumactl/cmd/config/config_suite_test.go
@@ -3,11 +3,9 @@ package config_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestConfigCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Config Cmd Suite")
+	test.RunSpecs(t, "Config Cmd Suite")
 }
diff --git a/app/kumactl/cmd/delete/delete_suite_test.go b/app/kumactl/cmd/delete/delete_suite_test.go
index d50e69234..797afecc0 100644
--- a/app/kumactl/cmd/delete/delete_suite_test.go
+++ b/app/kumactl/cmd/delete/delete_suite_test.go
@@ -3,11 +3,9 @@ package delete_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDeleteCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Delete Cmd Suite")
+	test.RunSpecs(t, "Delete Cmd Suite")
 }
diff --git a/app/kumactl/cmd/generate/generate_suite_test.go b/app/kumactl/cmd/generate/generate_suite_test.go
index b9fa49b7d..ae3e27d4d 100644
--- a/app/kumactl/cmd/generate/generate_suite_test.go
+++ b/app/kumactl/cmd/generate/generate_suite_test.go
@@ -3,11 +3,9 @@ package generate_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGenerateDataplaneTokenCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Generate Dataplane Token Suite")
+	test.RunSpecs(t, "Generate Dataplane Token Suite")
 }
diff --git a/app/kumactl/cmd/get/get_suite_test.go b/app/kumactl/cmd/get/get_suite_test.go
index f83995a8f..7cb1fb676 100644
--- a/app/kumactl/cmd/get/get_suite_test.go
+++ b/app/kumactl/cmd/get/get_suite_test.go
@@ -3,11 +3,9 @@ package get_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGetCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Get Cmd Suite")
+	test.RunSpecs(t, "Get Cmd Suite")
 }
diff --git a/app/kumactl/cmd/inspect/inspect_suite_test.go b/app/kumactl/cmd/inspect/inspect_suite_test.go
index 33fb46083..66a281f37 100644
--- a/app/kumactl/cmd/inspect/inspect_suite_test.go
+++ b/app/kumactl/cmd/inspect/inspect_suite_test.go
@@ -3,11 +3,9 @@ package inspect_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGetCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Inspect Cmd Suite")
+	test.RunSpecs(t, "Inspect Cmd Suite")
 }
diff --git a/app/kumactl/cmd/install/install_suite_test.go b/app/kumactl/cmd/install/install_suite_test.go
index e95baec8b..faa339a8a 100644
--- a/app/kumactl/cmd/install/install_suite_test.go
+++ b/app/kumactl/cmd/install/install_suite_test.go
@@ -3,11 +3,9 @@ package install_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestInstallCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Install Cmd Suite")
+	test.RunSpecs(t, "Install Cmd Suite")
 }
diff --git a/app/kumactl/cmd/uninstall/uninstall_suite_test.go b/app/kumactl/cmd/uninstall/uninstall_suite_test.go
index 42fbc1451..810c9090b 100644
--- a/app/kumactl/cmd/uninstall/uninstall_suite_test.go
+++ b/app/kumactl/cmd/uninstall/uninstall_suite_test.go
@@ -3,11 +3,9 @@ package uninstall_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestInstallCmd(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Uninstall Cmd Suite")
+	test.RunSpecs(t, "Uninstall Cmd Suite")
 }
diff --git a/app/kumactl/pkg/errors/errors_suite_test.go b/app/kumactl/pkg/errors/errors_suite_test.go
index 58f333e15..efecbedeb 100644
--- a/app/kumactl/pkg/errors/errors_suite_test.go
+++ b/app/kumactl/pkg/errors/errors_suite_test.go
@@ -3,11 +3,9 @@ package errors_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestWs(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Errors")
+	test.RunSpecs(t, "Errors")
 }
diff --git a/app/kumactl/pkg/output/json/json_suite_test.go b/app/kumactl/pkg/output/json/json_suite_test.go
index b18dd7535..3bc901534 100644
--- a/app/kumactl/pkg/output/json/json_suite_test.go
+++ b/app/kumactl/pkg/output/json/json_suite_test.go
@@ -3,11 +3,9 @@ package json_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestJson(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Json Suite")
+	test.RunSpecs(t, "Json Suite")
 }
diff --git a/app/kumactl/pkg/output/table/table_suite_test.go b/app/kumactl/pkg/output/table/table_suite_test.go
index 0a005b136..ae90724ed 100644
--- a/app/kumactl/pkg/output/table/table_suite_test.go
+++ b/app/kumactl/pkg/output/table/table_suite_test.go
@@ -3,11 +3,9 @@ package table_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestTable(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Table Suite")
+	test.RunSpecs(t, "Table Suite")
 }
diff --git a/app/kumactl/pkg/output/yaml/yaml_suite_test.go b/app/kumactl/pkg/output/yaml/yaml_suite_test.go
index b7c6b6015..e2d6adec8 100644
--- a/app/kumactl/pkg/output/yaml/yaml_suite_test.go
+++ b/app/kumactl/pkg/output/yaml/yaml_suite_test.go
@@ -3,11 +3,9 @@ package yaml_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestYaml(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Yaml Suite")
+	test.RunSpecs(t, "Yaml Suite")
 }
diff --git a/app/kumactl/pkg/resources/resources_suite_test.go b/app/kumactl/pkg/resources/resources_suite_test.go
index b38445adb..63f16f9c4 100644
--- a/app/kumactl/pkg/resources/resources_suite_test.go
+++ b/app/kumactl/pkg/resources/resources_suite_test.go
@@ -3,11 +3,9 @@ package resources
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestResources(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Resources Suite")
+	test.RunSpecs(t, "Resources Suite")
 }
diff --git a/app/kumactl/pkg/tokens/client_suite_test.go b/app/kumactl/pkg/tokens/client_suite_test.go
index bf7e9107b..e19dd239d 100644
--- a/app/kumactl/pkg/tokens/client_suite_test.go
+++ b/app/kumactl/pkg/tokens/client_suite_test.go
@@ -3,11 +3,9 @@ package tokens_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestTokensClient(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Tokens Client Suite")
+	test.RunSpecs(t, "Tokens Client Suite")
 }
diff --git a/pkg/api-server/api_server_suite_test.go b/pkg/api-server/api_server_suite_test.go
index 40bf98c78..f596b2a28 100644
--- a/pkg/api-server/api_server_suite_test.go
+++ b/pkg/api-server/api_server_suite_test.go
@@ -3,11 +3,9 @@ package api_server_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestWs(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "API Server")
+	test.RunSpecs(t, "API Server")
 }
diff --git a/pkg/api-server/customization/customization_suite_test.go b/pkg/api-server/customization/customization_suite_test.go
index f9251d842..f5e0e6151 100644
--- a/pkg/api-server/customization/customization_suite_test.go
+++ b/pkg/api-server/customization/customization_suite_test.go
@@ -4,7 +4,6 @@ import (
 	"path/filepath"
 	"testing"
 
-	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 
 	api_server "github.com/kumahq/kuma/pkg/api-server"
@@ -19,8 +18,7 @@ import (
 )
 
 func TestWs(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "API Server Customization")
+	test.RunSpecs(t, "API Server Customization")
 }
 
 func createTestApiServer(store store.ResourceStore, config *config_api_server.ApiServerConfig, enableGUI bool, metrics core_metrics.Metrics, wsManager customization.APIManager) *api_server.ApiServer {
diff --git a/pkg/clusterid/clusterid_suite_test.go b/pkg/clusterid/clusterid_suite_test.go
index 39e90a4fc..012dde409 100644
--- a/pkg/clusterid/clusterid_suite_test.go
+++ b/pkg/clusterid/clusterid_suite_test.go
@@ -3,11 +3,9 @@ package clusterid_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestClusterID(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cluster ID Suite")
+	test.RunSpecs(t, "Cluster ID Suite")
 }
diff --git a/pkg/cmd/version/version_suite_test.go b/pkg/cmd/version/version_suite_test.go
index fa25d588f..01cc5718a 100644
--- a/pkg/cmd/version/version_suite_test.go
+++ b/pkg/cmd/version/version_suite_test.go
@@ -3,11 +3,9 @@ package version_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestVersion(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Version Suite")
+	test.RunSpecs(t, "Version Suite")
 }
diff --git a/pkg/config/app/kuma-cp/suite_test.go b/pkg/config/app/kuma-cp/suite_test.go
index de339617d..89e9e03b5 100644
--- a/pkg/config/app/kuma-cp/suite_test.go
+++ b/pkg/config/app/kuma-cp/suite_test.go
@@ -3,11 +3,9 @@ package kuma_cp
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCpConfig(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Control Plane Configuration Suite")
+	test.RunSpecs(t, "Control Plane Configuration Suite")
 }
diff --git a/pkg/config/app/kuma-dp/kuma_dp_suite_test.go b/pkg/config/app/kuma-dp/kuma_dp_suite_test.go
index 177298dd2..dc18ff11e 100644
--- a/pkg/config/app/kuma-dp/kuma_dp_suite_test.go
+++ b/pkg/config/app/kuma-dp/kuma_dp_suite_test.go
@@ -3,11 +3,9 @@ package kumadp_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKumaDp(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "KumaDp Suite")
+	test.RunSpecs(t, "KumaDp Suite")
 }
diff --git a/pkg/config/app/kuma-prometheus-sd/kuma_prometheus_sd_test.go b/pkg/config/app/kuma-prometheus-sd/kuma_prometheus_sd_test.go
index af02aa188..763a11b1a 100644
--- a/pkg/config/app/kuma-prometheus-sd/kuma_prometheus_sd_test.go
+++ b/pkg/config/app/kuma-prometheus-sd/kuma_prometheus_sd_test.go
@@ -3,11 +3,9 @@ package kuma_prometheus_sd_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKumaPrometheusSD(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Kuma Prometheus SD Suite")
+	test.RunSpecs(t, "Kuma Prometheus SD Suite")
 }
diff --git a/pkg/config/plugins/resources/postgres/postgres_suite_test.go b/pkg/config/plugins/resources/postgres/postgres_suite_test.go
index 600228b55..119e329a9 100644
--- a/pkg/config/plugins/resources/postgres/postgres_suite_test.go
+++ b/pkg/config/plugins/resources/postgres/postgres_suite_test.go
@@ -3,11 +3,9 @@ package postgres_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestPostgresConfig(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Postgres Config Suite")
+	test.RunSpecs(t, "Postgres Config Suite")
 }
diff --git a/pkg/config/plugins/runtime/k8s/kuma_injector_suite_test.go b/pkg/config/plugins/runtime/k8s/kuma_injector_suite_test.go
index e2a2ce639..475b7bd44 100644
--- a/pkg/config/plugins/runtime/k8s/kuma_injector_suite_test.go
+++ b/pkg/config/plugins/runtime/k8s/kuma_injector_suite_test.go
@@ -3,11 +3,9 @@ package k8s_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKumaInjector(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "KumaInjector Suite")
+	test.RunSpecs(t, "KumaInjector Suite")
 }
diff --git a/pkg/config/plugins/runtime/universal/universal_suite_test.go b/pkg/config/plugins/runtime/universal/universal_suite_test.go
index d33efd155..05b955ab6 100644
--- a/pkg/config/plugins/runtime/universal/universal_suite_test.go
+++ b/pkg/config/plugins/runtime/universal/universal_suite_test.go
@@ -3,11 +3,9 @@ package universal_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestUniversalConfig(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Universal Config Suite")
+	test.RunSpecs(t, "Universal Config Suite")
 }
diff --git a/pkg/config/suite_test.go b/pkg/config/suite_test.go
index 2b3eb4af6..bcbba1506 100644
--- a/pkg/config/suite_test.go
+++ b/pkg/config/suite_test.go
@@ -3,11 +3,9 @@ package config_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestConfig(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Configuration Suite")
+	test.RunSpecs(t, "Configuration Suite")
 }
diff --git a/pkg/config/types/types_suite_test.go b/pkg/config/types/types_suite_test.go
index 4da242531..4fd0b35b2 100644
--- a/pkg/config/types/types_suite_test.go
+++ b/pkg/config/types/types_suite_test.go
@@ -3,11 +3,9 @@ package types_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestPflag(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Types Suite")
+	test.RunSpecs(t, "Types Suite")
 }
diff --git a/pkg/config/xds/bootstrap/bootstrap_suite_test.go b/pkg/config/xds/bootstrap/bootstrap_suite_test.go
index c5bb04dbf..15ae28647 100644
--- a/pkg/config/xds/bootstrap/bootstrap_suite_test.go
+++ b/pkg/config/xds/bootstrap/bootstrap_suite_test.go
@@ -3,11 +3,9 @@ package bootstrap_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestBootstrap(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Bootstrap Suite")
+	test.RunSpecs(t, "Bootstrap Suite")
 }
diff --git a/pkg/config/xds/xds_suite_test.go b/pkg/config/xds/xds_suite_test.go
index 8d5efb824..120947958 100644
--- a/pkg/config/xds/xds_suite_test.go
+++ b/pkg/config/xds/xds_suite_test.go
@@ -3,11 +3,9 @@ package xds_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds Suite")
+	test.RunSpecs(t, "Xds Suite")
 }
diff --git a/pkg/core/bootstrap/bootstrap_suite_test.go b/pkg/core/bootstrap/bootstrap_suite_test.go
index d7ca1f957..6664566b5 100644
--- a/pkg/core/bootstrap/bootstrap_suite_test.go
+++ b/pkg/core/bootstrap/bootstrap_suite_test.go
@@ -3,11 +3,9 @@ package bootstrap
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestBootstrap(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Bootstrap Suite")
+	test.RunSpecs(t, "Bootstrap Suite")
 }
diff --git a/pkg/core/config/manager/manager_suite_test.go b/pkg/core/config/manager/manager_suite_test.go
index 220750755..2cc2f83b3 100644
--- a/pkg/core/config/manager/manager_suite_test.go
+++ b/pkg/core/config/manager/manager_suite_test.go
@@ -3,11 +3,9 @@ package manager_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestConfigManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Config Manager Suite")
+	test.RunSpecs(t, "Config Manager Suite")
 }
diff --git a/pkg/core/datasource/datasource_suite_test.go b/pkg/core/datasource/datasource_suite_test.go
index 3a17c5599..27428e181 100644
--- a/pkg/core/datasource/datasource_suite_test.go
+++ b/pkg/core/datasource/datasource_suite_test.go
@@ -3,11 +3,9 @@ package datasource_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDataSource(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "DataSource Suite")
+	test.RunSpecs(t, "DataSource Suite")
 }
diff --git a/pkg/core/dns/lookup/cache_suite_test.go b/pkg/core/dns/lookup/cache_suite_test.go
index d87e15354..9cda3d997 100644
--- a/pkg/core/dns/lookup/cache_suite_test.go
+++ b/pkg/core/dns/lookup/cache_suite_test.go
@@ -3,11 +3,9 @@ package lookup_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDNSCaching(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "DNS with cache Suite")
+	test.RunSpecs(t, "DNS with cache Suite")
 }
diff --git a/pkg/core/faultinjections/matcher_suite_test.go b/pkg/core/faultinjections/matcher_suite_test.go
index c6504b472..043344647 100644
--- a/pkg/core/faultinjections/matcher_suite_test.go
+++ b/pkg/core/faultinjections/matcher_suite_test.go
@@ -3,11 +3,9 @@ package faultinjections
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMatcher(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "FaultInjection Matcher Suite")
+	test.RunSpecs(t, "FaultInjection Matcher Suite")
 }
diff --git a/pkg/core/logs/matcher_suite_test.go b/pkg/core/logs/matcher_suite_test.go
index 234d0483b..078be4e6b 100644
--- a/pkg/core/logs/matcher_suite_test.go
+++ b/pkg/core/logs/matcher_suite_test.go
@@ -3,11 +3,9 @@ package logs_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMatcher(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Log Matcher Suite")
+	test.RunSpecs(t, "Log Matcher Suite")
 }
diff --git a/pkg/core/managers/apis/dataplane/dataplane_manager_suit_test.go b/pkg/core/managers/apis/dataplane/dataplane_manager_suit_test.go
index 53db455b6..47dcc574c 100644
--- a/pkg/core/managers/apis/dataplane/dataplane_manager_suit_test.go
+++ b/pkg/core/managers/apis/dataplane/dataplane_manager_suit_test.go
@@ -3,11 +3,9 @@ package dataplane_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDataplaneManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Dataplane Manager Suite")
+	test.RunSpecs(t, "Dataplane Manager Suite")
 }
diff --git a/pkg/core/managers/apis/dataplaneinsight/dataplane_insight_manager_suit_test.go b/pkg/core/managers/apis/dataplaneinsight/dataplane_insight_manager_suit_test.go
index 07f8731d5..024ca9d07 100644
--- a/pkg/core/managers/apis/dataplaneinsight/dataplane_insight_manager_suit_test.go
+++ b/pkg/core/managers/apis/dataplaneinsight/dataplane_insight_manager_suit_test.go
@@ -3,11 +3,9 @@ package dataplaneinsight_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDataplaneInsightManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Dataplane Insights Manager Suite")
+	test.RunSpecs(t, "Dataplane Insights Manager Suite")
 }
diff --git a/pkg/core/managers/apis/mesh/mesh_manager_suite_test.go b/pkg/core/managers/apis/mesh/mesh_manager_suite_test.go
index 362af0d48..489705f2e 100644
--- a/pkg/core/managers/apis/mesh/mesh_manager_suite_test.go
+++ b/pkg/core/managers/apis/mesh/mesh_manager_suite_test.go
@@ -3,11 +3,9 @@ package mesh
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMeshManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Mesh Manager Suite")
+	test.RunSpecs(t, "Mesh Manager Suite")
 }
diff --git a/pkg/core/managers/apis/zone/zone_manager_suite_test.go b/pkg/core/managers/apis/zone/zone_manager_suite_test.go
index 7f8965310..b9b9bf0a3 100644
--- a/pkg/core/managers/apis/zone/zone_manager_suite_test.go
+++ b/pkg/core/managers/apis/zone/zone_manager_suite_test.go
@@ -3,11 +3,9 @@ package zone_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestZoneManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Zone Manager Suite")
+	test.RunSpecs(t, "Zone Manager Suite")
 }
diff --git a/pkg/core/managers/apis/zoneinsight/zone_insight_manager_suit_test.go b/pkg/core/managers/apis/zoneinsight/zone_insight_manager_suit_test.go
index b2d2e76ad..535bf79fa 100644
--- a/pkg/core/managers/apis/zoneinsight/zone_insight_manager_suit_test.go
+++ b/pkg/core/managers/apis/zoneinsight/zone_insight_manager_suit_test.go
@@ -3,11 +3,9 @@ package zoneinsight_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestZoneInsightManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Zone Insights Manager Suite")
+	test.RunSpecs(t, "Zone Insights Manager Suite")
 }
diff --git a/pkg/core/permissions/matcher_suite_test.go b/pkg/core/permissions/matcher_suite_test.go
index 2a96a06d0..6cc90aff4 100644
--- a/pkg/core/permissions/matcher_suite_test.go
+++ b/pkg/core/permissions/matcher_suite_test.go
@@ -3,11 +3,9 @@ package permissions
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMatcher(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Matcher Suite")
+	test.RunSpecs(t, "Matcher Suite")
 }
diff --git a/pkg/core/policy/policy_suite_test.go b/pkg/core/policy/policy_suite_test.go
index b0b90b23d..9327005f9 100644
--- a/pkg/core/policy/policy_suite_test.go
+++ b/pkg/core/policy/policy_suite_test.go
@@ -3,11 +3,9 @@ package policy_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMesh(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Policy Suite")
+	test.RunSpecs(t, "Policy Suite")
 }
diff --git a/pkg/core/ratelimits/matcher_suite_test.go b/pkg/core/ratelimits/matcher_suite_test.go
index c805cca02..b1448449b 100644
--- a/pkg/core/ratelimits/matcher_suite_test.go
+++ b/pkg/core/ratelimits/matcher_suite_test.go
@@ -3,11 +3,9 @@ package ratelimits
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMatcher(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Matcher Suite")
+	test.RunSpecs(t, "Matcher Suite")
 }
diff --git a/pkg/core/resources/apis/mesh/mesh_suit_test.go b/pkg/core/resources/apis/mesh/mesh_suit_test.go
index cf9efad9c..7b558a8e6 100644
--- a/pkg/core/resources/apis/mesh/mesh_suit_test.go
+++ b/pkg/core/resources/apis/mesh/mesh_suit_test.go
@@ -3,11 +3,9 @@ package mesh_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMesh(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Mesh Suite")
+	test.RunSpecs(t, "Mesh Suite")
 }
diff --git a/pkg/core/resources/apis/system/system_suit_test.go b/pkg/core/resources/apis/system/system_suit_test.go
index 1a10de68a..aeda3bb6c 100644
--- a/pkg/core/resources/apis/system/system_suit_test.go
+++ b/pkg/core/resources/apis/system/system_suit_test.go
@@ -3,11 +3,9 @@ package system_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSystem(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "System Suite")
+	test.RunSpecs(t, "System Suite")
 }
diff --git a/pkg/core/resources/manager/manager_suite_test.go b/pkg/core/resources/manager/manager_suite_test.go
index 2ad079e42..5c6f5f72d 100644
--- a/pkg/core/resources/manager/manager_suite_test.go
+++ b/pkg/core/resources/manager/manager_suite_test.go
@@ -3,11 +3,9 @@ package manager_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Resources Manager")
+	test.RunSpecs(t, "Resources Manager")
 }
diff --git a/pkg/core/resources/model/rest/rest_suite_test.go b/pkg/core/resources/model/rest/rest_suite_test.go
index 270afccd8..f9944531f 100644
--- a/pkg/core/resources/model/rest/rest_suite_test.go
+++ b/pkg/core/resources/model/rest/rest_suite_test.go
@@ -3,11 +3,9 @@ package rest_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestRest(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Rest Suite")
+	test.RunSpecs(t, "Rest Suite")
 }
diff --git a/pkg/core/secrets/manager/manager_suite_test.go b/pkg/core/secrets/manager/manager_suite_test.go
index 28a72de87..58f266106 100644
--- a/pkg/core/secrets/manager/manager_suite_test.go
+++ b/pkg/core/secrets/manager/manager_suite_test.go
@@ -3,11 +3,9 @@ package manager_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSecretManager(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Secret Manager Suite")
+	test.RunSpecs(t, "Secret Manager Suite")
 }
diff --git a/pkg/core/validators/validators_suit_test.go b/pkg/core/validators/validators_suit_test.go
index 3f2d71ef5..26fc0059c 100644
--- a/pkg/core/validators/validators_suit_test.go
+++ b/pkg/core/validators/validators_suit_test.go
@@ -3,11 +3,9 @@ package validators_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestValidators(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Validators")
+	test.RunSpecs(t, "Validators")
 }
diff --git a/pkg/core/xds/xds_suite_test.go b/pkg/core/xds/xds_suite_test.go
index 8d5efb824..120947958 100644
--- a/pkg/core/xds/xds_suite_test.go
+++ b/pkg/core/xds/xds_suite_test.go
@@ -3,11 +3,9 @@ package xds_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds Suite")
+	test.RunSpecs(t, "Xds Suite")
 }
diff --git a/pkg/defaults/defaults_suite_test.go b/pkg/defaults/defaults_suite_test.go
index cf5e82a3e..f4e32d8da 100644
--- a/pkg/defaults/defaults_suite_test.go
+++ b/pkg/defaults/defaults_suite_test.go
@@ -3,11 +3,9 @@ package defaults_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDefaults(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Defaults")
+	test.RunSpecs(t, "Defaults")
 }
diff --git a/pkg/defaults/mesh/mesh_suite_test.go b/pkg/defaults/mesh/mesh_suite_test.go
index 68a07ad43..70741d59e 100644
--- a/pkg/defaults/mesh/mesh_suite_test.go
+++ b/pkg/defaults/mesh/mesh_suite_test.go
@@ -3,11 +3,9 @@ package mesh_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMesh(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Defaults Mesh")
+	test.RunSpecs(t, "Defaults Mesh")
 }
diff --git a/pkg/dns/suite_test.go b/pkg/dns/suite_test.go
index e83ae1ce3..eb46411db 100644
--- a/pkg/dns/suite_test.go
+++ b/pkg/dns/suite_test.go
@@ -3,11 +3,9 @@ package dns_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestDNS(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "DNS Suite")
+	test.RunSpecs(t, "DNS Suite")
 }
diff --git a/pkg/dns/vips/vips_suite_test.go b/pkg/dns/vips/vips_suite_test.go
index 5eed07a16..4420aad59 100644
--- a/pkg/dns/vips/vips_suite_test.go
+++ b/pkg/dns/vips/vips_suite_test.go
@@ -3,11 +3,9 @@ package vips_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestVIPs(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "VIPs Suite")
+	test.RunSpecs(t, "VIPs Suite")
 }
diff --git a/pkg/envoy/accesslog/v3/accesslog_suite_test.go b/pkg/envoy/accesslog/v3/accesslog_suite_test.go
index 9c5328fec..88a7948ee 100644
--- a/pkg/envoy/accesslog/v3/accesslog_suite_test.go
+++ b/pkg/envoy/accesslog/v3/accesslog_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestAccesslog(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Accesslog Suite")
+	test.RunSpecs(t, "Accesslog Suite")
 }
diff --git a/pkg/envoy/admin/admin_suite_test.go b/pkg/envoy/admin/admin_suite_test.go
index e2e7eeb3c..502c2d77b 100644
--- a/pkg/envoy/admin/admin_suite_test.go
+++ b/pkg/envoy/admin/admin_suite_test.go
@@ -4,21 +4,21 @@ import (
 	"context"
 	"testing"
 
+	. "github.com/onsi/ginkgo"
+	. "github.com/onsi/gomega"
+
 	kuma_cp "github.com/kumahq/kuma/pkg/config/app/kuma-cp"
 	core_mesh "github.com/kumahq/kuma/pkg/core/resources/apis/mesh"
 	"github.com/kumahq/kuma/pkg/core/resources/model"
 	core_store "github.com/kumahq/kuma/pkg/core/resources/store"
 	"github.com/kumahq/kuma/pkg/defaults/mesh"
 	"github.com/kumahq/kuma/pkg/envoy/admin"
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/pkg/test/runtime"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestEnvoyAdmin(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "EnvoyAdmin Suite")
+	test.RunSpecs(t, "EnvoyAdmin Suite")
 }
 
 const (
diff --git a/pkg/gc/gc_suite_test.go b/pkg/gc/gc_suite_test.go
index 4be5880c2..dc93cfae5 100644
--- a/pkg/gc/gc_suite_test.go
+++ b/pkg/gc/gc_suite_test.go
@@ -3,11 +3,9 @@ package gc_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGC(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "GC Suite")
+	test.RunSpecs(t, "GC Suite")
 }
diff --git a/pkg/hds/authn/auth_suite_test.go b/pkg/hds/authn/auth_suite_test.go
index 88d18393c..d9cb4efff 100644
--- a/pkg/hds/authn/auth_suite_test.go
+++ b/pkg/hds/authn/auth_suite_test.go
@@ -3,11 +3,9 @@ package authn_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestAuthn(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "HDS Authn Suite")
+	test.RunSpecs(t, "HDS Authn Suite")
 }
diff --git a/pkg/hds/cache/cache_suite_test.go b/pkg/hds/cache/cache_suite_test.go
index 6493b3123..882f39936 100644
--- a/pkg/hds/cache/cache_suite_test.go
+++ b/pkg/hds/cache/cache_suite_test.go
@@ -3,11 +3,9 @@ package cache_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestHDSCache(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "HDS Cache Suite")
+	test.RunSpecs(t, "HDS Cache Suite")
 }
diff --git a/pkg/hds/tracker/hds_suite_test.go b/pkg/hds/tracker/hds_suite_test.go
index 44186a4fd..a8b308795 100644
--- a/pkg/hds/tracker/hds_suite_test.go
+++ b/pkg/hds/tracker/hds_suite_test.go
@@ -3,11 +3,9 @@ package tracker_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestHDSTracker(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "HDS Tracker Suite")
+	test.RunSpecs(t, "HDS Tracker Suite")
 }
diff --git a/pkg/insights/insights_suite_test.go b/pkg/insights/insights_suite_test.go
index fe0e7ee79..829147b11 100644
--- a/pkg/insights/insights_suite_test.go
+++ b/pkg/insights/insights_suite_test.go
@@ -3,11 +3,9 @@ package insights_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestInsights(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Insights Suite")
+	test.RunSpecs(t, "Insights Suite")
 }
diff --git a/pkg/kds/cache/cache_suite_test.go b/pkg/kds/cache/cache_suite_test.go
index 86e83bfbe..490ff0a76 100644
--- a/pkg/kds/cache/cache_suite_test.go
+++ b/pkg/kds/cache/cache_suite_test.go
@@ -3,11 +3,9 @@ package cache_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCache(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cache Suite")
+	test.RunSpecs(t, "Cache Suite")
 }
diff --git a/pkg/kds/client/client_suite_test.go b/pkg/kds/client/client_suite_test.go
index 049b7ac87..bf5ba4520 100644
--- a/pkg/kds/client/client_suite_test.go
+++ b/pkg/kds/client/client_suite_test.go
@@ -3,11 +3,9 @@ package client_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKDSClient(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "KDS Client Suite")
+	test.RunSpecs(t, "KDS Client Suite")
 }
diff --git a/pkg/kds/global/global_suite_test.go b/pkg/kds/global/global_suite_test.go
index f269a581e..4ce328a77 100644
--- a/pkg/kds/global/global_suite_test.go
+++ b/pkg/kds/global/global_suite_test.go
@@ -3,11 +3,9 @@ package global_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGlobalSync(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Global Sync Suite")
+	test.RunSpecs(t, "Global Sync Suite")
 }
diff --git a/pkg/kds/mux/mux_suite_test.go b/pkg/kds/mux/mux_suite_test.go
index 9cc5a8c11..52fb1902c 100644
--- a/pkg/kds/mux/mux_suite_test.go
+++ b/pkg/kds/mux/mux_suite_test.go
@@ -3,11 +3,9 @@ package mux_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMultiplexKDS(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Multiplex KDS Suite")
+	test.RunSpecs(t, "Multiplex KDS Suite")
 }
diff --git a/pkg/kds/server/server_suite_test.go b/pkg/kds/server/server_suite_test.go
index 428856f4e..31ca59b23 100644
--- a/pkg/kds/server/server_suite_test.go
+++ b/pkg/kds/server/server_suite_test.go
@@ -3,11 +3,9 @@ package server_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKDS(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "KDS Suite")
+	test.RunSpecs(t, "KDS Suite")
 }
diff --git a/pkg/kds/store/store_suite_test.go b/pkg/kds/store/store_suite_test.go
index 0ed8ac773..3d4afee5b 100644
--- a/pkg/kds/store/store_suite_test.go
+++ b/pkg/kds/store/store_suite_test.go
@@ -3,11 +3,9 @@ package store_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSyncResourceStore(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "SyncResourceStore Suite")
+	test.RunSpecs(t, "SyncResourceStore Suite")
 }
diff --git a/pkg/kds/zone/remote_suite_test.go b/pkg/kds/zone/remote_suite_test.go
index d9a241e9a..43550c262 100644
--- a/pkg/kds/zone/remote_suite_test.go
+++ b/pkg/kds/zone/remote_suite_test.go
@@ -3,11 +3,9 @@ package zone_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestZoneSync(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Zone Sync Suite")
+	test.RunSpecs(t, "Zone Sync Suite")
 }
diff --git a/pkg/mads/server/server_suite_test.go b/pkg/mads/server/server_suite_test.go
index 6c8cf3227..d5496e125 100644
--- a/pkg/mads/server/server_suite_test.go
+++ b/pkg/mads/server/server_suite_test.go
@@ -3,11 +3,9 @@ package server_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMADSServer(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "MADS Server Suite")
+	test.RunSpecs(t, "MADS Server Suite")
 }
diff --git a/pkg/mads/v1/cache/cache_suite_test.go b/pkg/mads/v1/cache/cache_suite_test.go
index 86e83bfbe..490ff0a76 100644
--- a/pkg/mads/v1/cache/cache_suite_test.go
+++ b/pkg/mads/v1/cache/cache_suite_test.go
@@ -3,11 +3,9 @@ package cache_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCache(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cache Suite")
+	test.RunSpecs(t, "Cache Suite")
 }
diff --git a/pkg/mads/v1/generator/generator_suite_test.go b/pkg/mads/v1/generator/generator_suite_test.go
index d53fec8b3..08bbd7154 100644
--- a/pkg/mads/v1/generator/generator_suite_test.go
+++ b/pkg/mads/v1/generator/generator_suite_test.go
@@ -3,11 +3,9 @@ package generator_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGenerator(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Generator Suite")
+	test.RunSpecs(t, "Generator Suite")
 }
diff --git a/pkg/mads/v1/reconcile/reconcile_suite_test.go b/pkg/mads/v1/reconcile/reconcile_suite_test.go
index 8e7ae5db6..338fbfca5 100644
--- a/pkg/mads/v1/reconcile/reconcile_suite_test.go
+++ b/pkg/mads/v1/reconcile/reconcile_suite_test.go
@@ -3,11 +3,9 @@ package reconcile_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestReconcile(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Reconcile Suite")
+	test.RunSpecs(t, "Reconcile Suite")
 }
diff --git a/pkg/mads/v1/v1_suite_test.go b/pkg/mads/v1/v1_suite_test.go
index 88053afce..7df2a3fd3 100644
--- a/pkg/mads/v1/v1_suite_test.go
+++ b/pkg/mads/v1/v1_suite_test.go
@@ -3,11 +3,9 @@ package v1_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestHttp(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "MADS v1 Suite")
+	test.RunSpecs(t, "MADS v1 Suite")
 }
diff --git a/pkg/mads/v1alpha1/cache/cache_suite_test.go b/pkg/mads/v1alpha1/cache/cache_suite_test.go
index 86e83bfbe..490ff0a76 100644
--- a/pkg/mads/v1alpha1/cache/cache_suite_test.go
+++ b/pkg/mads/v1alpha1/cache/cache_suite_test.go
@@ -3,11 +3,9 @@ package cache_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCache(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Cache Suite")
+	test.RunSpecs(t, "Cache Suite")
 }
diff --git a/pkg/mads/v1alpha1/generator/generator_suite_test.go b/pkg/mads/v1alpha1/generator/generator_suite_test.go
index d53fec8b3..08bbd7154 100644
--- a/pkg/mads/v1alpha1/generator/generator_suite_test.go
+++ b/pkg/mads/v1alpha1/generator/generator_suite_test.go
@@ -3,11 +3,9 @@ package generator_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGenerator(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Generator Suite")
+	test.RunSpecs(t, "Generator Suite")
 }
diff --git a/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go b/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go
index 8e7ae5db6..338fbfca5 100644
--- a/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go
+++ b/pkg/mads/v1alpha1/reconcile/reconcile_suite_test.go
@@ -3,11 +3,9 @@ package reconcile_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestReconcile(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Reconcile Suite")
+	test.RunSpecs(t, "Reconcile Suite")
 }
diff --git a/pkg/metrics/store/metrics_suite_test.go b/pkg/metrics/store/metrics_suite_test.go
index e8c099427..9cb74b873 100644
--- a/pkg/metrics/store/metrics_suite_test.go
+++ b/pkg/metrics/store/metrics_suite_test.go
@@ -3,11 +3,9 @@ package metrics_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMetrics(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Metrics Suite")
+	test.RunSpecs(t, "Metrics Suite")
 }
diff --git a/pkg/plugins/ca/builtin/builtin_suite_test.go b/pkg/plugins/ca/builtin/builtin_suite_test.go
index bf6695eff..33662eb95 100644
--- a/pkg/plugins/ca/builtin/builtin_suite_test.go
+++ b/pkg/plugins/ca/builtin/builtin_suite_test.go
@@ -3,11 +3,9 @@ package builtin_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCaBuiltin(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "CA Builtin Suite")
+	test.RunSpecs(t, "CA Builtin Suite")
 }
diff --git a/pkg/plugins/ca/provided/provided_suite_test.go b/pkg/plugins/ca/provided/provided_suite_test.go
index 2cf9ad8e9..517905231 100644
--- a/pkg/plugins/ca/provided/provided_suite_test.go
+++ b/pkg/plugins/ca/provided/provided_suite_test.go
@@ -3,11 +3,9 @@ package provided_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCaProvided(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "CA Provided Suite")
+	test.RunSpecs(t, "CA Provided Suite")
 }
diff --git a/pkg/plugins/common/k8s/k8s_suite_test.go b/pkg/plugins/common/k8s/k8s_suite_test.go
index 4b7eb1513..0c73a6e96 100644
--- a/pkg/plugins/common/k8s/k8s_suite_test.go
+++ b/pkg/plugins/common/k8s/k8s_suite_test.go
@@ -3,11 +3,9 @@ package k8s_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestK8s(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "K8s Suite")
+	test.RunSpecs(t, "K8s Suite")
 }
diff --git a/pkg/plugins/config/k8s/k8s_suite_test.go b/pkg/plugins/config/k8s/k8s_suite_test.go
index 24e06411e..ede73cca6 100644
--- a/pkg/plugins/config/k8s/k8s_suite_test.go
+++ b/pkg/plugins/config/k8s/k8s_suite_test.go
@@ -4,20 +4,15 @@ import (
 	"testing"
 	"time"
 
-	"sigs.k8s.io/controller-runtime/pkg/envtest"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 
+	kube_core "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
+	"sigs.k8s.io/controller-runtime/pkg/envtest"
 
 	"github.com/kumahq/kuma/pkg/test"
-
-	kube_core "k8s.io/api/core/v1"
 	// +kubebuilder:scaffold:imports
 )
 
@@ -26,16 +21,10 @@ var testEnv *envtest.Environment
 var k8sClientScheme = runtime.NewScheme()
 
 func TestKubernetes(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Kubernetes Config Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Kubernetes Config Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{}
 
diff --git a/pkg/plugins/leader/postgres/postgres_suite_test.go b/pkg/plugins/leader/postgres/postgres_suite_test.go
index 3875dfa81..a1b7b8f25 100644
--- a/pkg/plugins/leader/postgres/postgres_suite_test.go
+++ b/pkg/plugins/leader/postgres/postgres_suite_test.go
@@ -3,11 +3,9 @@ package postgres
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestPostgresLeader(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Postgres Leader Suite")
+	test.RunSpecs(t, "Postgres Leader Suite")
 }
diff --git a/pkg/plugins/resources/k8s/k8s_suite_test.go b/pkg/plugins/resources/k8s/k8s_suite_test.go
index 086e4001f..e77097f6d 100644
--- a/pkg/plugins/resources/k8s/k8s_suite_test.go
+++ b/pkg/plugins/resources/k8s/k8s_suite_test.go
@@ -24,14 +24,12 @@ import (
 
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
+
 	kube_core "k8s.io/api/core/v1"
 	kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/envtest"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 
 	mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1"
 	k8s_registry "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/registry"
@@ -47,16 +45,10 @@ var testEnv *envtest.Environment
 var k8sClientScheme = runtime.NewScheme()
 
 func TestKubernetes(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Kubernetes Resources Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Kubernetes Resources Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{
 		CRDDirectoryPaths: []string{
diff --git a/pkg/plugins/resources/k8s/native/api/v1alpha1/suite_test.go b/pkg/plugins/resources/k8s/native/api/v1alpha1/suite_test.go
index a954d1944..cfcc9ee30 100644
--- a/pkg/plugins/resources/k8s/native/api/v1alpha1/suite_test.go
+++ b/pkg/plugins/resources/k8s/native/api/v1alpha1/suite_test.go
@@ -21,20 +21,16 @@ import (
 	"testing"
 	"time"
 
-	"sigs.k8s.io/controller-runtime/pkg/envtest"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 
 	"k8s.io/client-go/kubernetes/scheme"
 	"k8s.io/client-go/rest"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
+	"sigs.k8s.io/controller-runtime/pkg/envtest"
 
 	"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/model"
-	"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/test"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 var cfg *rest.Config
@@ -42,16 +38,10 @@ var k8sClient client.Client
 var testEnv *envtest.Environment
 
 func TestAPIs(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"v1alpha1 Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "v1alpha1 Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{
 		CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
diff --git a/pkg/plugins/resources/k8s/native/controllers/suite_test.go b/pkg/plugins/resources/k8s/native/controllers/suite_test.go
index 25eca7ec1..7ccc58a5f 100644
--- a/pkg/plugins/resources/k8s/native/controllers/suite_test.go
+++ b/pkg/plugins/resources/k8s/native/controllers/suite_test.go
@@ -21,18 +21,16 @@ import (
 	"testing"
 	"time"
 
-	"sigs.k8s.io/controller-runtime/pkg/envtest"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
+
+	"sigs.k8s.io/controller-runtime/pkg/envtest"
+
 	"k8s.io/client-go/kubernetes/scheme"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 
 	meshv1alpha1 "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1"
-	"github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/pkg/test"
+	"github.com/kumahq/kuma/pkg/test"
 	// +kubebuilder:scaffold:imports
 )
 
@@ -40,16 +38,10 @@ var k8sClient client.Client
 var testEnv *envtest.Environment
 
 func TestAPIs(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Controller Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Controller Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{
 		CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
diff --git a/pkg/plugins/resources/k8s/native/pkg/test/within.go b/pkg/plugins/resources/k8s/native/pkg/test/within.go
deleted file mode 100644
index 6a1e418a9..000000000
--- a/pkg/plugins/resources/k8s/native/pkg/test/within.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package test
-
-import (
-	"time"
-
-	"github.com/onsi/ginkgo"
-	"github.com/onsi/gomega"
-)
-
-// Within returns a function that executes the given test task in
-// a dedicated goroutine, asserting that it must complete within
-// the given timeout.
-//
-// See https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md#removed-async-testing
-func Within(timeout time.Duration, task func()) func() {
-	return func() {
-		done := make(chan interface{})
-
-		go func() {
-			defer ginkgo.GinkgoRecover()
-			defer close(done)
-			task()
-		}()
-
-		gomega.Eventually(done, timeout).Should(gomega.BeClosed())
-	}
-}
diff --git a/pkg/plugins/resources/memory/memory_suite_test.go b/pkg/plugins/resources/memory/memory_suite_test.go
index 508bef4a6..d96678205 100644
--- a/pkg/plugins/resources/memory/memory_suite_test.go
+++ b/pkg/plugins/resources/memory/memory_suite_test.go
@@ -3,11 +3,9 @@ package memory_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestClient(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "In-memory ResourceStore Suite")
+	test.RunSpecs(t, "In-memory ResourceStore Suite")
 }
diff --git a/pkg/plugins/resources/postgres/store_suite_test.go b/pkg/plugins/resources/postgres/store_suite_test.go
index 1b2b00529..b20e40b32 100644
--- a/pkg/plugins/resources/postgres/store_suite_test.go
+++ b/pkg/plugins/resources/postgres/store_suite_test.go
@@ -3,11 +3,9 @@ package postgres
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestPostgresStore(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Postgres Resource Store Suite")
+	test.RunSpecs(t, "Postgres Resource Store Suite")
 }
diff --git a/pkg/plugins/resources/remote/remote_suite_test.go b/pkg/plugins/resources/remote/remote_suite_test.go
index e55a1a898..7cb5ead21 100644
--- a/pkg/plugins/resources/remote/remote_suite_test.go
+++ b/pkg/plugins/resources/remote/remote_suite_test.go
@@ -3,11 +3,9 @@ package remote_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestRemote(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Remote Suite")
+	test.RunSpecs(t, "Remote Suite")
 }
diff --git a/pkg/plugins/runtime/k8s/controllers/suite_test.go b/pkg/plugins/runtime/k8s/controllers/suite_test.go
index 193f948f6..a9d873696 100644
--- a/pkg/plugins/runtime/k8s/controllers/suite_test.go
+++ b/pkg/plugins/runtime/k8s/controllers/suite_test.go
@@ -5,17 +5,14 @@ import (
 	"testing"
 	"time"
 
-	"sigs.k8s.io/controller-runtime/pkg/envtest"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
+
 	kube_core "k8s.io/api/core/v1"
 	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
+	"sigs.k8s.io/controller-runtime/pkg/envtest"
 
 	meshv1alpha1 "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1"
 	k8scnicncfio "github.com/kumahq/kuma/pkg/plugins/runtime/k8s/apis/k8s.cni.cncf.io"
@@ -27,16 +24,10 @@ var testEnv *envtest.Environment
 var k8sClientScheme = runtime.NewScheme()
 
 func TestAPIs(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Namespace Controller Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Namespace Controller Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{
 		CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "..", "resources", "k8s", "native", "config", "crd", "bases")},
diff --git a/pkg/plugins/runtime/k8s/metadata/metadata_suite_test.go b/pkg/plugins/runtime/k8s/metadata/metadata_suite_test.go
index e9eda2a95..206d96e84 100644
--- a/pkg/plugins/runtime/k8s/metadata/metadata_suite_test.go
+++ b/pkg/plugins/runtime/k8s/metadata/metadata_suite_test.go
@@ -3,11 +3,9 @@ package metadata_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMetadata(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Kubernetes Metadata")
+	test.RunSpecs(t, "Kubernetes Metadata")
 }
diff --git a/pkg/plugins/runtime/k8s/probes/suite_test.go b/pkg/plugins/runtime/k8s/probes/suite_test.go
index 59b9f0149..f1de5ea2b 100644
--- a/pkg/plugins/runtime/k8s/probes/suite_test.go
+++ b/pkg/plugins/runtime/k8s/probes/suite_test.go
@@ -3,15 +3,9 @@ package probes
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestProbes(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Probe Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Probe Suite")
 }
diff --git a/pkg/plugins/runtime/k8s/util/util_suite_test.go b/pkg/plugins/runtime/k8s/util/util_suite_test.go
index 9a34451a4..734bf3aa0 100644
--- a/pkg/plugins/runtime/k8s/util/util_suite_test.go
+++ b/pkg/plugins/runtime/k8s/util/util_suite_test.go
@@ -3,11 +3,9 @@ package util_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestUtil(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Util Suite")
+	test.RunSpecs(t, "Util Suite")
 }
diff --git a/pkg/plugins/runtime/k8s/webhooks/injector/injector_suite_test.go b/pkg/plugins/runtime/k8s/webhooks/injector/injector_suite_test.go
index ed9c6b8bb..895261cd8 100644
--- a/pkg/plugins/runtime/k8s/webhooks/injector/injector_suite_test.go
+++ b/pkg/plugins/runtime/k8s/webhooks/injector/injector_suite_test.go
@@ -23,13 +23,11 @@ import (
 
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
+
 	kube_core "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/envtest"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 
 	mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1"
 	"github.com/kumahq/kuma/pkg/test"
@@ -41,16 +39,10 @@ var testEnv *envtest.Environment
 var k8sClientScheme = runtime.NewScheme()
 
 func TestInjector(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Kubernetes Resources Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Kubernetes Resources Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{
 		CRDDirectoryPaths: []string{
diff --git a/pkg/plugins/runtime/k8s/webhooks/webhook_suite_test.go b/pkg/plugins/runtime/k8s/webhooks/webhook_suite_test.go
index f58769c4a..2befa0bc8 100644
--- a/pkg/plugins/runtime/k8s/webhooks/webhook_suite_test.go
+++ b/pkg/plugins/runtime/k8s/webhooks/webhook_suite_test.go
@@ -5,10 +5,9 @@ import (
 	"path/filepath"
 	"testing"
 
-	sample_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/test/api/sample/v1alpha1"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
+
 	kube_core "k8s.io/api/core/v1"
 	kube_meta "k8s.io/apimachinery/pkg/apis/meta/v1"
 	kube_runtime "k8s.io/apimachinery/pkg/runtime"
@@ -17,11 +16,12 @@ import (
 	kube_admission "sigs.k8s.io/controller-runtime/pkg/webhook/admission"
 
 	mesh_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/api/v1alpha1"
+	sample_k8s "github.com/kumahq/kuma/pkg/plugins/resources/k8s/native/test/api/sample/v1alpha1"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestWebhook(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Webhooks Suite")
+	test.RunSpecs(t, "Webhooks Suite")
 }
 
 var decoder *kube_admission.Decoder
diff --git a/pkg/plugins/runtime/universal/outbound/outbound_suite_test.go b/pkg/plugins/runtime/universal/outbound/outbound_suite_test.go
index 6fc91e01d..ccbe62e5d 100644
--- a/pkg/plugins/runtime/universal/outbound/outbound_suite_test.go
+++ b/pkg/plugins/runtime/universal/outbound/outbound_suite_test.go
@@ -3,11 +3,9 @@ package outbound_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestOutbound(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Universal outbound test")
+	test.RunSpecs(t, "Universal outbound test")
 }
diff --git a/pkg/plugins/runtime/universal/universal_suite_test.go b/pkg/plugins/runtime/universal/universal_suite_test.go
index f49125fc2..630f3a2cf 100644
--- a/pkg/plugins/runtime/universal/universal_suite_test.go
+++ b/pkg/plugins/runtime/universal/universal_suite_test.go
@@ -3,11 +3,9 @@ package universal_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestUniversal(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Universal Runtime Plugin")
+	test.RunSpecs(t, "Universal Runtime Plugin")
 }
diff --git a/pkg/plugins/secrets/k8s/k8s_suite_test.go b/pkg/plugins/secrets/k8s/k8s_suite_test.go
index 248c5c7d2..3635d5487 100644
--- a/pkg/plugins/secrets/k8s/k8s_suite_test.go
+++ b/pkg/plugins/secrets/k8s/k8s_suite_test.go
@@ -20,18 +20,13 @@ import (
 	"testing"
 	"time"
 
-	"sigs.k8s.io/controller-runtime/pkg/envtest"
-
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
 
+	kube_core "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/runtime"
 	"sigs.k8s.io/controller-runtime/pkg/client"
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	kube_core "k8s.io/api/core/v1"
+	"sigs.k8s.io/controller-runtime/pkg/envtest"
 
 	"github.com/kumahq/kuma/pkg/test"
 	// +kubebuilder:scaffold:imports
@@ -42,16 +37,10 @@ var testEnv *envtest.Environment
 var k8sClientScheme = runtime.NewScheme()
 
 func TestKubernetes(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Kubernetes Secrets Suite",
-		[]Reporter{printer.NewlineReporter{}})
+	test.RunSpecs(t, "Kubernetes Secrets Suite")
 }
 
 var _ = BeforeSuite(test.Within(time.Minute, func() {
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 	By("bootstrapping test environment")
 	testEnv = &envtest.Environment{}
 
diff --git a/pkg/sds/server/v3/server_suite_test.go b/pkg/sds/server/v3/server_suite_test.go
index bd3a41b45..93241d511 100644
--- a/pkg/sds/server/v3/server_suite_test.go
+++ b/pkg/sds/server/v3/server_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestServer(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "SDS Server Suite")
+	test.RunSpecs(t, "SDS Server Suite")
 }
diff --git a/pkg/test/ginkgo.go b/pkg/test/ginkgo.go
new file mode 100644
index 000000000..be3e42098
--- /dev/null
+++ b/pkg/test/ginkgo.go
@@ -0,0 +1,27 @@
+package test
+
+import (
+	"testing"
+
+	"github.com/go-logr/logr"
+	"github.com/onsi/ginkgo"
+	"github.com/onsi/gomega"
+	"sigs.k8s.io/controller-runtime/pkg/log"
+	"sigs.k8s.io/controller-runtime/pkg/log/zap"
+
+	"github.com/kumahq/kuma/pkg/core"
+)
+
+// RunSpecs wraps ginkgo+gomega test suite initialization.
+func RunSpecs(t *testing.T, description string) {
+	// Make resetting the core logger a no-op so that internal
+	// code doesn't interfere with testing.
+	core.SetLogger = func(l logr.Logger) {}
+
+	// Log to the Ginkgo writer. This makes Ginkgo emit logs on
+	// test failure.
+	log.SetLogger(zap.LoggerTo(ginkgo.GinkgoWriter, true))
+
+	gomega.RegisterFailHandlerWithT(t, ginkgo.Fail)
+	ginkgo.RunSpecs(t, description)
+}
diff --git a/pkg/tokens/builtin/server/server_suite_test.go b/pkg/tokens/builtin/server/server_suite_test.go
index 9f802a6a7..714a1b4fe 100644
--- a/pkg/tokens/builtin/server/server_suite_test.go
+++ b/pkg/tokens/builtin/server/server_suite_test.go
@@ -3,11 +3,9 @@ package server_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestServer(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Dataplane Token Server Suite")
+	test.RunSpecs(t, "Dataplane Token Server Suite")
 }
diff --git a/pkg/transparentproxy/firewalld/firewalld_suite_test.go b/pkg/transparentproxy/firewalld/firewalld_suite_test.go
index 85a0ab560..6c3e2aa8a 100644
--- a/pkg/transparentproxy/firewalld/firewalld_suite_test.go
+++ b/pkg/transparentproxy/firewalld/firewalld_suite_test.go
@@ -19,11 +19,9 @@ package firewalld_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestFirewalld(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Firewalld Suite")
+	test.RunSpecs(t, "Firewalld Suite")
 }
diff --git a/pkg/transparentproxy/kubernetes/kubernetes_suite_test.go b/pkg/transparentproxy/kubernetes/kubernetes_suite_test.go
index 87eed3ae2..2b83a20df 100644
--- a/pkg/transparentproxy/kubernetes/kubernetes_suite_test.go
+++ b/pkg/transparentproxy/kubernetes/kubernetes_suite_test.go
@@ -19,11 +19,9 @@ package kubernetes_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestKubernetes(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Kubernetes Suite")
+	test.RunSpecs(t, "Kubernetes Suite")
 }
diff --git a/pkg/util/http/http_suite_test.go b/pkg/util/http/http_suite_test.go
index a9c5b9f8c..a2ecfdfb5 100644
--- a/pkg/util/http/http_suite_test.go
+++ b/pkg/util/http/http_suite_test.go
@@ -3,11 +3,9 @@ package http_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestHttp(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Http Suite")
+	test.RunSpecs(t, "Http Suite")
 }
diff --git a/pkg/util/maps/maps_suite_test.go b/pkg/util/maps/maps_suite_test.go
index 04f7c8d2b..0b506526a 100644
--- a/pkg/util/maps/maps_suite_test.go
+++ b/pkg/util/maps/maps_suite_test.go
@@ -3,11 +3,9 @@ package maps_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMaps(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Maps Suite")
+	test.RunSpecs(t, "Maps Suite")
 }
diff --git a/pkg/util/net/net_suite_test.go b/pkg/util/net/net_suite_test.go
index 9427dbf3e..05d9f35fa 100644
--- a/pkg/util/net/net_suite_test.go
+++ b/pkg/util/net/net_suite_test.go
@@ -3,11 +3,9 @@ package net_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestNet(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Net Suite")
+	test.RunSpecs(t, "Net Suite")
 }
diff --git a/pkg/util/os/os_suite_test.go b/pkg/util/os/os_suite_test.go
index 091653cd8..15960552e 100644
--- a/pkg/util/os/os_suite_test.go
+++ b/pkg/util/os/os_suite_test.go
@@ -3,11 +3,9 @@ package os
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestOS(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "OS Suite")
+	test.RunSpecs(t, "OS Suite")
 }
diff --git a/pkg/util/proto/proto_suite_test.go b/pkg/util/proto/proto_suite_test.go
index 755d9d589..4744502b4 100644
--- a/pkg/util/proto/proto_suite_test.go
+++ b/pkg/util/proto/proto_suite_test.go
@@ -3,16 +3,9 @@ package proto_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-
-	util_test "github.com/kumahq/kuma/pkg/util/test"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestProtoUtils(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Generator Suite",
-		[]Reporter{util_test.NewlineReporter{}})
+	test.RunSpecs(t, "Generator Suite")
 }
diff --git a/pkg/util/test/ginkgo.go b/pkg/util/test/ginkgo.go
deleted file mode 100644
index 7087213df..000000000
--- a/pkg/util/test/ginkgo.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-import (
-	"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
-)
-
-type NewlineReporter = printer.NewlineReporter
diff --git a/pkg/util/watchdog/watchdog_suite_test.go b/pkg/util/watchdog/watchdog_suite_test.go
index 5495aa44c..429ac9be7 100644
--- a/pkg/util/watchdog/watchdog_suite_test.go
+++ b/pkg/util/watchdog/watchdog_suite_test.go
@@ -3,11 +3,9 @@ package watchdog_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestWatchdog(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Watchdog Suite")
+	test.RunSpecs(t, "Watchdog Suite")
 }
diff --git a/pkg/util/xds/v2/xds_suite_test.go b/pkg/util/xds/v2/xds_suite_test.go
index fcb3c2232..01f85fde5 100644
--- a/pkg/util/xds/v2/xds_suite_test.go
+++ b/pkg/util/xds/v2/xds_suite_test.go
@@ -3,11 +3,9 @@ package v2_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds V2 Suite")
+	test.RunSpecs(t, "Xds V2 Suite")
 }
diff --git a/pkg/util/xds/v3/xds_suite_test.go b/pkg/util/xds/v3/xds_suite_test.go
index d9d5119fb..35bb42f7b 100644
--- a/pkg/util/xds/v3/xds_suite_test.go
+++ b/pkg/util/xds/v3/xds_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds V3 Suite")
+	test.RunSpecs(t, "Xds V3 Suite")
 }
diff --git a/pkg/util/xds/xds_suite_test.go b/pkg/util/xds/xds_suite_test.go
index 8d5efb824..120947958 100644
--- a/pkg/util/xds/xds_suite_test.go
+++ b/pkg/util/xds/xds_suite_test.go
@@ -3,11 +3,9 @@ package xds_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestXds(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Xds Suite")
+	test.RunSpecs(t, "Xds Suite")
 }
diff --git a/pkg/xds/auth/auth_suite_test.go b/pkg/xds/auth/auth_suite_test.go
index c6bf00e94..b31c803a2 100644
--- a/pkg/xds/auth/auth_suite_test.go
+++ b/pkg/xds/auth/auth_suite_test.go
@@ -3,11 +3,9 @@ package auth_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestAuth(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "XDS Auth Suite")
+	test.RunSpecs(t, "XDS Auth Suite")
 }
diff --git a/pkg/xds/auth/universal/universal_suite_test.go b/pkg/xds/auth/universal/universal_suite_test.go
index 61cb86751..52c9e7a04 100644
--- a/pkg/xds/auth/universal/universal_suite_test.go
+++ b/pkg/xds/auth/universal/universal_suite_test.go
@@ -3,11 +3,9 @@ package universal_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestUniversal(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Sds Auth Universal Suite")
+	test.RunSpecs(t, "Sds Auth Universal Suite")
 }
diff --git a/pkg/xds/bootstrap/bootstrap_suite_test.go b/pkg/xds/bootstrap/bootstrap_suite_test.go
index d7ca1f957..6664566b5 100644
--- a/pkg/xds/bootstrap/bootstrap_suite_test.go
+++ b/pkg/xds/bootstrap/bootstrap_suite_test.go
@@ -3,11 +3,9 @@ package bootstrap
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestBootstrap(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Bootstrap Suite")
+	test.RunSpecs(t, "Bootstrap Suite")
 }
diff --git a/pkg/xds/cache/cla/cla_suite_test.go b/pkg/xds/cache/cla/cla_suite_test.go
index b4e9d91a9..ece08723b 100644
--- a/pkg/xds/cache/cla/cla_suite_test.go
+++ b/pkg/xds/cache/cla/cla_suite_test.go
@@ -3,11 +3,9 @@ package cla_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCLA(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "CLA Suite")
+	test.RunSpecs(t, "CLA Suite")
 }
diff --git a/pkg/xds/cache/mesh/mesh_suite_test.go b/pkg/xds/cache/mesh/mesh_suite_test.go
index a4e093f04..3154f44fe 100644
--- a/pkg/xds/cache/mesh/mesh_suite_test.go
+++ b/pkg/xds/cache/mesh/mesh_suite_test.go
@@ -3,11 +3,9 @@ package mesh_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMeshSnapshot(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "MeshSnapshot Suite")
+	test.RunSpecs(t, "MeshSnapshot Suite")
 }
diff --git a/pkg/xds/cache/once/once_suite_test.go b/pkg/xds/cache/once/once_suite_test.go
index f3264e424..d29b44283 100644
--- a/pkg/xds/cache/once/once_suite_test.go
+++ b/pkg/xds/cache/once/once_suite_test.go
@@ -3,11 +3,9 @@ package once_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestOnce(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Once Suite")
+	test.RunSpecs(t, "Once Suite")
 }
diff --git a/pkg/xds/envoy/clusters/v3/clusters_suite_test.go b/pkg/xds/envoy/clusters/v3/clusters_suite_test.go
index 0b1e17e78..28879daea 100644
--- a/pkg/xds/envoy/clusters/v3/clusters_suite_test.go
+++ b/pkg/xds/envoy/clusters/v3/clusters_suite_test.go
@@ -3,11 +3,9 @@ package clusters_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestClusters(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Clusters V3 Suite")
+	test.RunSpecs(t, "Clusters V3 Suite")
 }
diff --git a/pkg/xds/envoy/endpoints/v3/endpoints_suite_test.go b/pkg/xds/envoy/endpoints/v3/endpoints_suite_test.go
index 7eb53a0de..0c3a4a996 100644
--- a/pkg/xds/envoy/endpoints/v3/endpoints_suite_test.go
+++ b/pkg/xds/envoy/endpoints/v3/endpoints_suite_test.go
@@ -3,11 +3,9 @@ package endpoints_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestEndpoints(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Endpoints Suite")
+	test.RunSpecs(t, "Endpoints Suite")
 }
diff --git a/pkg/xds/envoy/envoy_suite_test.go b/pkg/xds/envoy/envoy_suite_test.go
index 73ba253a0..4e4d4e6ef 100644
--- a/pkg/xds/envoy/envoy_suite_test.go
+++ b/pkg/xds/envoy/envoy_suite_test.go
@@ -3,11 +3,9 @@ package envoy_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSync(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Envoy Suite")
+	test.RunSpecs(t, "Envoy Suite")
 }
diff --git a/pkg/xds/envoy/listeners/listener_suite_test.go b/pkg/xds/envoy/listeners/listener_suite_test.go
index cfed434c0..2fbfd6cb5 100644
--- a/pkg/xds/envoy/listeners/listener_suite_test.go
+++ b/pkg/xds/envoy/listeners/listener_suite_test.go
@@ -3,11 +3,9 @@ package listeners_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestListener(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Listener Suite")
+	test.RunSpecs(t, "Listener Suite")
 }
diff --git a/pkg/xds/envoy/listeners/v3/listener_suite_test.go b/pkg/xds/envoy/listeners/v3/listener_suite_test.go
index b95055eae..45fc78c54 100644
--- a/pkg/xds/envoy/listeners/v3/listener_suite_test.go
+++ b/pkg/xds/envoy/listeners/v3/listener_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestListener(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Listener V3 Suite")
+	test.RunSpecs(t, "Listener V3 Suite")
 }
diff --git a/pkg/xds/envoy/metadata/v3/metadata_suite_test.go b/pkg/xds/envoy/metadata/v3/metadata_suite_test.go
index 51f307449..25436107a 100644
--- a/pkg/xds/envoy/metadata/v3/metadata_suite_test.go
+++ b/pkg/xds/envoy/metadata/v3/metadata_suite_test.go
@@ -3,11 +3,9 @@ package envoy_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestMetadata(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Envoy Metadata V3 Suite")
+	test.RunSpecs(t, "Envoy Metadata V3 Suite")
 }
diff --git a/pkg/xds/envoy/names/names_suite_test.go b/pkg/xds/envoy/names/names_suite_test.go
index 381051f39..663b549eb 100644
--- a/pkg/xds/envoy/names/names_suite_test.go
+++ b/pkg/xds/envoy/names/names_suite_test.go
@@ -3,11 +3,9 @@ package names_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestNames(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Names Suite")
+	test.RunSpecs(t, "Names Suite")
 }
diff --git a/pkg/xds/envoy/routes/routes_suite_test.go b/pkg/xds/envoy/routes/routes_suite_test.go
index f3acae59b..a223b92dc 100644
--- a/pkg/xds/envoy/routes/routes_suite_test.go
+++ b/pkg/xds/envoy/routes/routes_suite_test.go
@@ -3,11 +3,9 @@ package routes_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestRoutes(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Routes Suite")
+	test.RunSpecs(t, "Routes Suite")
 }
diff --git a/pkg/xds/envoy/routes/v3/routes_suite_test.go b/pkg/xds/envoy/routes/v3/routes_suite_test.go
index 5bba435e8..8aa5f2ce5 100644
--- a/pkg/xds/envoy/routes/v3/routes_suite_test.go
+++ b/pkg/xds/envoy/routes/v3/routes_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestRoutes(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Routes V3 Suite")
+	test.RunSpecs(t, "Routes V3 Suite")
 }
diff --git a/pkg/xds/envoy/tags/tags_suite_test.go b/pkg/xds/envoy/tags/tags_suite_test.go
index 531475d5f..f8a9965e5 100644
--- a/pkg/xds/envoy/tags/tags_suite_test.go
+++ b/pkg/xds/envoy/tags/tags_suite_test.go
@@ -3,11 +3,9 @@ package tags_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestTags(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Listener Suite")
+	test.RunSpecs(t, "Listener Suite")
 }
diff --git a/pkg/xds/envoy/tls/v3/tls_suite_test.go b/pkg/xds/envoy/tls/v3/tls_suite_test.go
index 9308f9091..52513db49 100644
--- a/pkg/xds/envoy/tls/v3/tls_suite_test.go
+++ b/pkg/xds/envoy/tls/v3/tls_suite_test.go
@@ -3,16 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-
-	util_test "github.com/kumahq/kuma/pkg/util/test"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestTLS(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Envoy TLS Suite",
-		[]Reporter{util_test.NewlineReporter{}})
+	test.RunSpecs(t, "Envoy TLS Suite")
 }
diff --git a/pkg/xds/generator/generator_suite_test.go b/pkg/xds/generator/generator_suite_test.go
index 0c34879b6..08bbd7154 100644
--- a/pkg/xds/generator/generator_suite_test.go
+++ b/pkg/xds/generator/generator_suite_test.go
@@ -3,16 +3,9 @@ package generator_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-
-	util_test "github.com/kumahq/kuma/pkg/util/test"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestGenerator(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Generator Suite",
-		[]Reporter{util_test.NewlineReporter{}})
+	test.RunSpecs(t, "Generator Suite")
 }
diff --git a/pkg/xds/generator/modifications/v3/modifications_suite_test.go b/pkg/xds/generator/modifications/v3/modifications_suite_test.go
index 4d5dcfa53..fc1eecaa3 100644
--- a/pkg/xds/generator/modifications/v3/modifications_suite_test.go
+++ b/pkg/xds/generator/modifications/v3/modifications_suite_test.go
@@ -3,17 +3,10 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-
-	util_test "github.com/kumahq/kuma/pkg/util/test"
+	"github.com/kumahq/kuma/pkg/test"
 	_ "github.com/kumahq/kuma/pkg/xds/envoy"
 )
 
 func TestModifications(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Modifications V3 Suite",
-		[]Reporter{util_test.NewlineReporter{}})
+	test.RunSpecs(t, "Modifications V3 Suite")
 }
diff --git a/pkg/xds/ingress/ingress_suite_test.go b/pkg/xds/ingress/ingress_suite_test.go
index 9da8d99a4..13ddc6397 100644
--- a/pkg/xds/ingress/ingress_suite_test.go
+++ b/pkg/xds/ingress/ingress_suite_test.go
@@ -3,16 +3,9 @@ package ingress_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
-
-	util_test "github.com/kumahq/kuma/pkg/util/test"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestIngress(t *testing.T) {
-	RegisterFailHandler(Fail)
-
-	RunSpecsWithDefaultAndCustomReporters(t,
-		"Ingress Suite",
-		[]Reporter{util_test.NewlineReporter{}})
+	test.RunSpecs(t, "Ingress Suite")
 }
diff --git a/pkg/xds/server/callbacks/callbacks_suite_test.go b/pkg/xds/server/callbacks/callbacks_suite_test.go
index 3a4e2695c..b3a63b598 100644
--- a/pkg/xds/server/callbacks/callbacks_suite_test.go
+++ b/pkg/xds/server/callbacks/callbacks_suite_test.go
@@ -3,11 +3,9 @@ package callbacks_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestCallbacks(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "XDS Callbacks Suite")
+	test.RunSpecs(t, "XDS Callbacks Suite")
 }
diff --git a/pkg/core/xds/v3/context.go b/pkg/xds/server/v3/context.go
similarity index 100%
rename from pkg/core/xds/v3/context.go
rename to pkg/xds/server/v3/context.go
diff --git a/pkg/xds/server/v3/reconcile_test.go b/pkg/xds/server/v3/reconcile_test.go
index 0310e3c85..c27252e34 100644
--- a/pkg/xds/server/v3/reconcile_test.go
+++ b/pkg/xds/server/v3/reconcile_test.go
@@ -15,7 +15,6 @@ import (
 	"github.com/kumahq/kuma/pkg/core"
 	mesh_core "github.com/kumahq/kuma/pkg/core/resources/apis/mesh"
 	xds_model "github.com/kumahq/kuma/pkg/core/xds"
-	core_xds_v3 "github.com/kumahq/kuma/pkg/core/xds/v3"
 	test_model "github.com/kumahq/kuma/pkg/test/resources/model"
 	xds_context "github.com/kumahq/kuma/pkg/xds/context"
 )
@@ -41,10 +40,10 @@ var _ = Describe("Reconcile", func() {
 			}
 		})
 
-		var xdsContext core_xds_v3.XdsContext
+		var xdsContext XdsContext
 
 		BeforeEach(func() {
-			xdsContext = core_xds_v3.NewXdsContext()
+			xdsContext = NewXdsContext()
 		})
 
 		snapshot := envoy_cache.Snapshot{
diff --git a/pkg/xds/server/v3/server_suite_test.go b/pkg/xds/server/v3/server_suite_test.go
index de418125d..c469da3e2 100644
--- a/pkg/xds/server/v3/server_suite_test.go
+++ b/pkg/xds/server/v3/server_suite_test.go
@@ -3,11 +3,9 @@ package v3_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSync(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "XDS Server V2 Suite")
+	test.RunSpecs(t, "XDS Server V2 Suite")
 }
diff --git a/pkg/xds/sync/sync_suite_test.go b/pkg/xds/sync/sync_suite_test.go
index 9337d9b60..04ad889c4 100644
--- a/pkg/xds/sync/sync_suite_test.go
+++ b/pkg/xds/sync/sync_suite_test.go
@@ -3,11 +3,9 @@ package sync_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestSync(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Sync Suite")
+	test.RunSpecs(t, "Sync Suite")
 }
diff --git a/pkg/xds/topology/topology_suite_test.go b/pkg/xds/topology/topology_suite_test.go
index 9e619ccd0..943d36779 100644
--- a/pkg/xds/topology/topology_suite_test.go
+++ b/pkg/xds/topology/topology_suite_test.go
@@ -3,11 +3,9 @@ package topology_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestTopology(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "Topology Suite")
+	test.RunSpecs(t, "Topology Suite")
 }
diff --git a/test/e2e/compatibility/compatibility_suite_test.go b/test/e2e/compatibility/compatibility_suite_test.go
index aee80a084..0d5077d9e 100644
--- a/test/e2e/compatibility/compatibility_suite_test.go
+++ b/test/e2e/compatibility/compatibility_suite_test.go
@@ -3,28 +3,14 @@ package compatibility_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ECompatibility(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Deploy Suite")
+		test.RunSpecs(t, "E2E Deploy Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/deploy/deploy_suite_test.go b/test/e2e/deploy/deploy_suite_test.go
index 0c9029033..12a648a39 100644
--- a/test/e2e/deploy/deploy_suite_test.go
+++ b/test/e2e/deploy/deploy_suite_test.go
@@ -3,28 +3,14 @@ package deploy_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EDeploy(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Deploy Suite")
+		test.RunSpecs(t, "E2E Deploy Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/externalservices/externalservices_suite_test.go b/test/e2e/externalservices/externalservices_suite_test.go
index 9286ef054..7014d972a 100644
--- a/test/e2e/externalservices/externalservices_suite_test.go
+++ b/test/e2e/externalservices/externalservices_suite_test.go
@@ -3,28 +3,14 @@ package externalservices_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EExternalServices(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E External Services Suite")
+		test.RunSpecs(t, "E2E External Services Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/healthcheck/hybrid/e2e_suite_test.go b/test/e2e/healthcheck/hybrid/e2e_suite_test.go
index 1f867f923..0cbfd9f57 100644
--- a/test/e2e/healthcheck/hybrid/e2e_suite_test.go
+++ b/test/e2e/healthcheck/hybrid/e2e_suite_test.go
@@ -3,16 +3,13 @@ package hybrid_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EHealthCheckHybrid(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Health Check Hybrid Suite")
+		test.RunSpecs(t, "Health Check Hybrid Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/healthcheck/universal/e2e_suite_test.go b/test/e2e/healthcheck/universal/e2e_suite_test.go
index 3b8e19cda..9a232c4fd 100644
--- a/test/e2e/healthcheck/universal/e2e_suite_test.go
+++ b/test/e2e/healthcheck/universal/e2e_suite_test.go
@@ -3,16 +3,13 @@ package universal_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EHealthCheckUniversal(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Health Check Universal Suite")
+		test.RunSpecs(t, "Health Check Universal Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/helm/helm_suite_test.go b/test/e2e/helm/helm_suite_test.go
index 0be128d9f..4148cc83b 100644
--- a/test/e2e/helm/helm_suite_test.go
+++ b/test/e2e/helm/helm_suite_test.go
@@ -3,28 +3,14 @@ package helm_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EHelm(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Helm Suite")
+		test.RunSpecs(t, "E2E Helm Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/hybrid/hybrid_suite_test.go b/test/e2e/hybrid/hybrid_suite_test.go
index 18d36065e..06b20fb21 100644
--- a/test/e2e/hybrid/hybrid_suite_test.go
+++ b/test/e2e/hybrid/hybrid_suite_test.go
@@ -3,28 +3,14 @@ package hybrid_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EDeploy(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Deploy Suite")
+		test.RunSpecs(t, "E2E Deploy Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/k8s_api_bypass/k8s_api_bypass_suite_test.go b/test/e2e/k8s_api_bypass/k8s_api_bypass_suite_test.go
index 65e2f0e41..fca9f1155 100644
--- a/test/e2e/k8s_api_bypass/k8s_api_bypass_suite_test.go
+++ b/test/e2e/k8s_api_bypass/k8s_api_bypass_suite_test.go
@@ -3,28 +3,14 @@ package k8s_api_bypass_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EExternalServices(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Kubernetes API Bypass")
+		test.RunSpecs(t, "Kubernetes API Bypass")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/kic/kubernetes/kubernetes_suite_test.go b/test/e2e/kic/kubernetes/kubernetes_suite_test.go
index 60c786d56..61f55e0e2 100644
--- a/test/e2e/kic/kubernetes/kubernetes_suite_test.go
+++ b/test/e2e/kic/kubernetes/kubernetes_suite_test.go
@@ -3,16 +3,13 @@ package kubernetes_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EKICKubernetes(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "KIC Kubernetes Suite")
+		test.RunSpecs(t, "KIC Kubernetes Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/ratelimit/ratelimit_suite_test.go b/test/e2e/ratelimit/ratelimit_suite_test.go
index 9edcbbf15..5ded00f17 100644
--- a/test/e2e/ratelimit/ratelimit_suite_test.go
+++ b/test/e2e/ratelimit/ratelimit_suite_test.go
@@ -3,16 +3,13 @@ package ratelimit_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ERateLimit(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E RateLimit Suite")
+		test.RunSpecs(t, "E2E RateLimit Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/resilience/resilience_suite_test.go b/test/e2e/resilience/resilience_suite_test.go
index e5ee281bd..b5ad17e23 100644
--- a/test/e2e/resilience/resilience_suite_test.go
+++ b/test/e2e/resilience/resilience_suite_test.go
@@ -3,28 +3,14 @@ package resilience_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EResilience(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Resilience tests")
+		test.RunSpecs(t, "Resilience tests")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/retry/retry_suite_test.go b/test/e2e/retry/retry_suite_test.go
index 269c896e2..e0398b00f 100644
--- a/test/e2e/retry/retry_suite_test.go
+++ b/test/e2e/retry/retry_suite_test.go
@@ -3,28 +3,14 @@ package retry_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ERetry(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Retry Suite")
+		test.RunSpecs(t, "E2E Retry Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/timeout/timeout_suite_test.go b/test/e2e/timeout/timeout_suite_test.go
index 50b03deeb..1cdc254b8 100644
--- a/test/e2e/timeout/timeout_suite_test.go
+++ b/test/e2e/timeout/timeout_suite_test.go
@@ -3,28 +3,14 @@ package timeout_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2EHealthCheck(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Health Check Suite")
+		test.RunSpecs(t, "E2E Health Check Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/tracing/tracing_suite_test.go b/test/e2e/tracing/tracing_suite_test.go
index 3b8f653ab..9f3e01a73 100644
--- a/test/e2e/tracing/tracing_suite_test.go
+++ b/test/e2e/tracing/tracing_suite_test.go
@@ -3,28 +3,14 @@ package tracing_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	"github.com/go-logr/logr"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ETracing(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "E2E Tracing Suite")
+		test.RunSpecs(t, "E2E Tracing Suite")
 	} else {
 		t.SkipNow()
 	}
 }
-
-var _ = BeforeSuite(func() {
-	core.SetLogger = func(l logr.Logger) {}
-	logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-})
diff --git a/test/e2e/trafficpermission/hybrid/e2e_suite_test.go b/test/e2e/trafficpermission/hybrid/e2e_suite_test.go
index 9ff23d061..b012ac54c 100644
--- a/test/e2e/trafficpermission/hybrid/e2e_suite_test.go
+++ b/test/e2e/trafficpermission/hybrid/e2e_suite_test.go
@@ -3,16 +3,13 @@ package hybrid_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ETrafficPermissionHybrid(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Traffic Permission Hybrid Suite")
+		test.RunSpecs(t, "Traffic Permission Hybrid Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/trafficpermission/universal/e2e_suite_test.go b/test/e2e/trafficpermission/universal/e2e_suite_test.go
index ae1b4c3c0..2cbdfcbcd 100644
--- a/test/e2e/trafficpermission/universal/e2e_suite_test.go
+++ b/test/e2e/trafficpermission/universal/e2e_suite_test.go
@@ -3,16 +3,13 @@ package universal_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ETrafficPermissionUniversal(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Traffic Permission Universal Suite")
+		test.RunSpecs(t, "Traffic Permission Universal Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/trafficpermission/universal/traffic_permission_universal.go b/test/e2e/trafficpermission/universal/traffic_permission_universal.go
index 678f443bf..5ac6d76b9 100644
--- a/test/e2e/trafficpermission/universal/traffic_permission_universal.go
+++ b/test/e2e/trafficpermission/universal/traffic_permission_universal.go
@@ -1,14 +1,10 @@
 package universal
 
 import (
-	"github.com/go-logr/logr"
 	. "github.com/onsi/ginkgo"
 	. "github.com/onsi/gomega"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
 
 	config_core "github.com/kumahq/kuma/pkg/config/core"
-	"github.com/kumahq/kuma/pkg/core"
 	. "github.com/kumahq/kuma/test/framework"
 )
 
@@ -27,9 +23,6 @@ mtls:
 `
 
 	E2EBeforeSuite(func() {
-		core.SetLogger = func(l logr.Logger) {}
-		logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
-
 		universalCluster = NewUniversalCluster(NewTestingT(), Kuma1, Silent)
 		deployOptsFuncs = KumaUniversalDeployOpts
 
diff --git a/test/e2e/trafficroute/testutil/testutil_suite_test.go b/test/e2e/trafficroute/testutil/testutil_suite_test.go
index b8b512f68..e9a27281f 100644
--- a/test/e2e/trafficroute/testutil/testutil_suite_test.go
+++ b/test/e2e/trafficroute/testutil/testutil_suite_test.go
@@ -3,11 +3,9 @@ package testutil_test
 import (
 	"testing"
 
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
+	"github.com/kumahq/kuma/pkg/test"
 )
 
 func TestApproximatelyMatcher(t *testing.T) {
-	RegisterFailHandler(Fail)
-	RunSpecs(t, "ApproximatelyEqual Matcher Suite")
+	test.RunSpecs(t, "ApproximatelyEqual Matcher Suite")
 }
diff --git a/test/e2e/trafficroute/universal_multizone/e2e_suite_test.go b/test/e2e/trafficroute/universal_multizone/e2e_suite_test.go
index 1dc7e06d7..bb48f0450 100644
--- a/test/e2e/trafficroute/universal_multizone/e2e_suite_test.go
+++ b/test/e2e/trafficroute/universal_multizone/e2e_suite_test.go
@@ -3,16 +3,13 @@ package universal_multizone_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ETrafficRouteUniversalMultizone(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Traffic Route Universal Multizone Suite")
+		test.RunSpecs(t, "Traffic Route Universal Multizone Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/e2e/trafficroute/universal_standalone/e2e_suite_test.go b/test/e2e/trafficroute/universal_standalone/e2e_suite_test.go
index 596f13920..fcf2f3513 100644
--- a/test/e2e/trafficroute/universal_standalone/e2e_suite_test.go
+++ b/test/e2e/trafficroute/universal_standalone/e2e_suite_test.go
@@ -3,16 +3,13 @@ package universal_standalone_test
 import (
 	"testing"
 
+	"github.com/kumahq/kuma/pkg/test"
 	"github.com/kumahq/kuma/test/framework"
-
-	. "github.com/onsi/ginkgo"
-	. "github.com/onsi/gomega"
 )
 
 func TestE2ETrafficRouteUniversalStandalone(t *testing.T) {
 	if framework.IsK8sClustersStarted() {
-		RegisterFailHandler(Fail)
-		RunSpecs(t, "Traffic Route Universal Standalone Suite")
+		test.RunSpecs(t, "Traffic Route Universal Standalone Suite")
 	} else {
 		t.SkipNow()
 	}
diff --git a/test/framework/ginkgo.go b/test/framework/ginkgo.go
index ba9ff8060..1acb40911 100644
--- a/test/framework/ginkgo.go
+++ b/test/framework/ginkgo.go
@@ -1,13 +1,8 @@
 package framework
 
 import (
-	"github.com/go-logr/logr"
 	"github.com/onsi/ginkgo"
 	ginkgo_config "github.com/onsi/ginkgo/config"
-	logf "sigs.k8s.io/controller-runtime/pkg/log"
-	"sigs.k8s.io/controller-runtime/pkg/log/zap"
-
-	"github.com/kumahq/kuma/pkg/core"
 )
 
 func ShouldSkipCleanup() bool {
@@ -34,8 +29,6 @@ func E2EAfterSuite(fn func()) {
 
 func E2EBeforeSuite(fn func()) {
 	ginkgo.BeforeSuite(func() {
-		core.SetLogger = func(l logr.Logger) {}
-		logf.SetLogger(zap.LoggerTo(ginkgo.GinkgoWriter, true))
 		fn()
 	})
 }