Repository: containous/maesh
Pull request #559 (2020-05-07 15:31:51)

Rename test fixture dirs to testdata
## What does this PR do?

This PR:

- Renames the test `fixtures` directories to `testdata`.

The idiomatic name of the test fixtures directory in Go is `testdata`, e.g. this folder is used by the  [http](https://golang.org/src/net/http/) pkg in the std library. This folder is also ignored by the `go` tool as described [here](https://golang.org/cmd/go/#hdr-Description_of_package_lists). So, renaming fixtures dirs could avoid potential side effects with the `go` tool.

>  The go tool will ignore a directory named "testdata", making it available to hold ancillary data needed by the tests. 



Patch:
diff --git a/.gitignore b/.gitignore
index ee8475f..704127d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,7 +14,6 @@ maesh
 /dist/
 .vscode
 vendor
-integration/resources/compose/images
 pages/
 maesh-gh-pages*
 *.zip
diff --git a/integration/resources/acl/disabled/http.json b/integration/testdata/acl/disabled/http.json
similarity index 100%
rename from integration/resources/acl/disabled/http.json
rename to integration/testdata/acl/disabled/http.json
diff --git a/integration/resources/acl/disabled/http/1.server.yaml b/integration/testdata/acl/disabled/http/1.server.yaml
similarity index 100%
rename from integration/resources/acl/disabled/http/1.server.yaml
rename to integration/testdata/acl/disabled/http/1.server.yaml
diff --git a/integration/resources/acl/disabled/tcp.json b/integration/testdata/acl/disabled/tcp.json
similarity index 100%
rename from integration/resources/acl/disabled/tcp.json
rename to integration/testdata/acl/disabled/tcp.json
diff --git a/integration/resources/acl/disabled/tcp/1.server.yaml b/integration/testdata/acl/disabled/tcp/1.server.yaml
similarity index 100%
rename from integration/resources/acl/disabled/tcp/1.server.yaml
rename to integration/testdata/acl/disabled/tcp/1.server.yaml
diff --git a/integration/resources/acl/disabled/traffic-split.json b/integration/testdata/acl/disabled/traffic-split.json
similarity index 100%
rename from integration/resources/acl/disabled/traffic-split.json
rename to integration/testdata/acl/disabled/traffic-split.json
diff --git a/integration/resources/acl/disabled/traffic-split/1.server.yaml b/integration/testdata/acl/disabled/traffic-split/1.server.yaml
similarity index 100%
rename from integration/resources/acl/disabled/traffic-split/1.server.yaml
rename to integration/testdata/acl/disabled/traffic-split/1.server.yaml
diff --git a/integration/resources/acl/disabled/traffic-split/2.server-v1.yaml b/integration/testdata/acl/disabled/traffic-split/2.server-v1.yaml
similarity index 100%
rename from integration/resources/acl/disabled/traffic-split/2.server-v1.yaml
rename to integration/testdata/acl/disabled/traffic-split/2.server-v1.yaml
diff --git a/integration/resources/acl/disabled/traffic-split/3.server-v2.yaml b/integration/testdata/acl/disabled/traffic-split/3.server-v2.yaml
similarity index 100%
rename from integration/resources/acl/disabled/traffic-split/3.server-v2.yaml
rename to integration/testdata/acl/disabled/traffic-split/3.server-v2.yaml
diff --git a/integration/resources/acl/disabled/udp.json b/integration/testdata/acl/disabled/udp.json
similarity index 100%
rename from integration/resources/acl/disabled/udp.json
rename to integration/testdata/acl/disabled/udp.json
diff --git a/integration/resources/acl/disabled/udp/1.server.yaml b/integration/testdata/acl/disabled/udp/1.server.yaml
similarity index 100%
rename from integration/resources/acl/disabled/udp/1.server.yaml
rename to integration/testdata/acl/disabled/udp/1.server.yaml
diff --git a/integration/resources/acl/enabled/traffic-split.json b/integration/testdata/acl/enabled/traffic-split.json
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split.json
rename to integration/testdata/acl/enabled/traffic-split.json
diff --git a/integration/resources/acl/enabled/traffic-split/1.client.yaml b/integration/testdata/acl/enabled/traffic-split/1.client.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split/1.client.yaml
rename to integration/testdata/acl/enabled/traffic-split/1.client.yaml
diff --git a/integration/resources/acl/enabled/traffic-split/2.server.yaml b/integration/testdata/acl/enabled/traffic-split/2.server.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split/2.server.yaml
rename to integration/testdata/acl/enabled/traffic-split/2.server.yaml
diff --git a/integration/resources/acl/enabled/traffic-split/3.server-v1.yaml b/integration/testdata/acl/enabled/traffic-split/3.server-v1.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split/3.server-v1.yaml
rename to integration/testdata/acl/enabled/traffic-split/3.server-v1.yaml
diff --git a/integration/resources/acl/enabled/traffic-split/4.server-v2.yaml b/integration/testdata/acl/enabled/traffic-split/4.server-v2.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split/4.server-v2.yaml
rename to integration/testdata/acl/enabled/traffic-split/4.server-v2.yaml
diff --git a/integration/resources/acl/enabled/traffic-split/5.traffic-target.yaml b/integration/testdata/acl/enabled/traffic-split/5.traffic-target.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-split/5.traffic-target.yaml
rename to integration/testdata/acl/enabled/traffic-split/5.traffic-target.yaml
diff --git a/integration/resources/acl/enabled/traffic-target.json b/integration/testdata/acl/enabled/traffic-target.json
similarity index 100%
rename from integration/resources/acl/enabled/traffic-target.json
rename to integration/testdata/acl/enabled/traffic-target.json
diff --git a/integration/resources/acl/enabled/traffic-target/1.client.yaml b/integration/testdata/acl/enabled/traffic-target/1.client.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-target/1.client.yaml
rename to integration/testdata/acl/enabled/traffic-target/1.client.yaml
diff --git a/integration/resources/acl/enabled/traffic-target/2.server.yaml b/integration/testdata/acl/enabled/traffic-target/2.server.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-target/2.server.yaml
rename to integration/testdata/acl/enabled/traffic-target/2.server.yaml
diff --git a/integration/resources/acl/enabled/traffic-target/3.traffic-target.yaml b/integration/testdata/acl/enabled/traffic-target/3.traffic-target.yaml
similarity index 100%
rename from integration/resources/acl/enabled/traffic-target/3.traffic-target.yaml
rename to integration/testdata/acl/enabled/traffic-target/3.traffic-target.yaml
diff --git a/integration/resources/build/Dockerfile b/integration/testdata/build/Dockerfile
similarity index 100%
rename from integration/resources/build/Dockerfile
rename to integration/testdata/build/Dockerfile
diff --git a/integration/resources/build/entrypoint.sh b/integration/testdata/build/entrypoint.sh
similarity index 100%
rename from integration/resources/build/entrypoint.sh
rename to integration/testdata/build/entrypoint.sh
diff --git a/integration/resources/coredns/coredns.yaml b/integration/testdata/coredns/coredns.yaml
similarity index 100%
rename from integration/resources/coredns/coredns.yaml
rename to integration/testdata/coredns/coredns.yaml
diff --git a/integration/resources/coredns/corednssafe.yaml b/integration/testdata/coredns/corednssafe.yaml
similarity index 100%
rename from integration/resources/coredns/corednssafe.yaml
rename to integration/testdata/coredns/corednssafe.yaml
diff --git a/integration/resources/kubedns/kubedns.yaml b/integration/testdata/kubedns/kubedns.yaml
similarity index 100%
rename from integration/resources/kubedns/kubedns.yaml
rename to integration/testdata/kubedns/kubedns.yaml
diff --git a/integration/resources/smi/crds/smi-access.yaml b/integration/testdata/smi/crds/smi-access.yaml
similarity index 100%
rename from integration/resources/smi/crds/smi-access.yaml
rename to integration/testdata/smi/crds/smi-access.yaml
diff --git a/integration/resources/smi/crds/smi-spec.yaml b/integration/testdata/smi/crds/smi-spec.yaml
similarity index 100%
rename from integration/resources/smi/crds/smi-spec.yaml
rename to integration/testdata/smi/crds/smi-spec.yaml
diff --git a/integration/resources/smi/crds/smi-trafficsplits.yaml b/integration/testdata/smi/crds/smi-trafficsplits.yaml
similarity index 100%
rename from integration/resources/smi/crds/smi-trafficsplits.yaml
rename to integration/testdata/smi/crds/smi-trafficsplits.yaml
diff --git a/integration/resources/state-table/tcp-configmap.yml b/integration/testdata/state-table/tcp-configmap.yml
similarity index 100%
rename from integration/resources/state-table/tcp-configmap.yml
rename to integration/testdata/state-table/tcp-configmap.yml
diff --git a/integration/resources/state-table/udp-configmap.yaml b/integration/testdata/state-table/udp-configmap.yaml
similarity index 100%
rename from integration/resources/state-table/udp-configmap.yaml
rename to integration/testdata/state-table/udp-configmap.yaml
diff --git a/integration/resources/tools/deployment.yaml b/integration/testdata/tools/deployment.yaml
similarity index 100%
rename from integration/resources/tools/deployment.yaml
rename to integration/testdata/tools/deployment.yaml
diff --git a/integration/resources/values.yaml b/integration/testdata/values.yaml
similarity index 100%
rename from integration/resources/values.yaml
rename to integration/testdata/values.yaml
diff --git a/integration/resources/whoami/0-namespaces.yaml b/integration/testdata/whoami/0-namespaces.yaml
similarity index 100%
rename from integration/resources/whoami/0-namespaces.yaml
rename to integration/testdata/whoami/0-namespaces.yaml
diff --git a/integration/resources/whoami/whoami-test.yaml b/integration/testdata/whoami/whoami-test.yaml
similarity index 100%
rename from integration/resources/whoami/whoami-test.yaml
rename to integration/testdata/whoami/whoami-test.yaml
diff --git a/integration/resources/whoami/whoami.yaml b/integration/testdata/whoami/whoami.yaml
similarity index 100%
rename from integration/resources/whoami/whoami.yaml
rename to integration/testdata/whoami/whoami.yaml
diff --git a/pkg/api/fixtures/getmeshnodeconfiguration_empty.yaml b/pkg/api/testdata/getmeshnodeconfiguration_empty.yaml
similarity index 100%
rename from pkg/api/fixtures/getmeshnodeconfiguration_empty.yaml
rename to pkg/api/testdata/getmeshnodeconfiguration_empty.yaml
diff --git a/pkg/api/fixtures/getmeshnodeconfiguration_simple.yaml b/pkg/api/testdata/getmeshnodeconfiguration_simple.yaml
similarity index 100%
rename from pkg/api/fixtures/getmeshnodeconfiguration_simple.yaml
rename to pkg/api/testdata/getmeshnodeconfiguration_simple.yaml
diff --git a/pkg/api/fixtures/getmeshnodes_empty.yaml b/pkg/api/testdata/getmeshnodes_empty.yaml
similarity index 100%
rename from pkg/api/fixtures/getmeshnodes_empty.yaml
rename to pkg/api/testdata/getmeshnodes_empty.yaml
diff --git a/pkg/api/fixtures/getmeshnodes_one_mesh_pod.yaml b/pkg/api/testdata/getmeshnodes_one_mesh_pod.yaml
similarity index 100%
rename from pkg/api/fixtures/getmeshnodes_one_mesh_pod.yaml
rename to pkg/api/testdata/getmeshnodes_one_mesh_pod.yaml
diff --git a/pkg/api/fixtures/getmeshnodes_one_nonready_mesh_pod.yaml b/pkg/api/testdata/getmeshnodes_one_nonready_mesh_pod.yaml
similarity index 100%
rename from pkg/api/fixtures/getmeshnodes_one_nonready_mesh_pod.yaml
rename to pkg/api/testdata/getmeshnodes_one_nonready_mesh_pod.yaml
diff --git a/pkg/cleanup/fixtures/mock.yaml b/pkg/cleanup/testdata/mock.yaml
similarity index 100%
rename from pkg/cleanup/fixtures/mock.yaml
rename to pkg/cleanup/testdata/mock.yaml
diff --git a/pkg/controller/fixtures/getmeshnodeconfiguration_empty.yaml b/pkg/controller/testdata/getmeshnodeconfiguration_empty.yaml
similarity index 100%
rename from pkg/controller/fixtures/getmeshnodeconfiguration_empty.yaml
rename to pkg/controller/testdata/getmeshnodeconfiguration_empty.yaml
diff --git a/pkg/controller/fixtures/getmeshnodeconfiguration_simple.yaml b/pkg/controller/testdata/getmeshnodeconfiguration_simple.yaml
similarity index 100%
rename from pkg/controller/fixtures/getmeshnodeconfiguration_simple.yaml
rename to pkg/controller/testdata/getmeshnodeconfiguration_simple.yaml
diff --git a/pkg/controller/fixtures/getmeshnodes_empty.yaml b/pkg/controller/testdata/getmeshnodes_empty.yaml
similarity index 100%
rename from pkg/controller/fixtures/getmeshnodes_empty.yaml
rename to pkg/controller/testdata/getmeshnodes_empty.yaml
diff --git a/pkg/controller/fixtures/getmeshnodes_one_mesh_pod.yaml b/pkg/controller/testdata/getmeshnodes_one_mesh_pod.yaml
similarity index 100%
rename from pkg/controller/fixtures/getmeshnodes_one_mesh_pod.yaml
rename to pkg/controller/testdata/getmeshnodes_one_mesh_pod.yaml
diff --git a/pkg/controller/fixtures/getmeshnodes_one_nonready_mesh_pod.yaml b/pkg/controller/testdata/getmeshnodes_one_nonready_mesh_pod.yaml
similarity index 100%
rename from pkg/controller/fixtures/getmeshnodes_one_nonready_mesh_pod.yaml
rename to pkg/controller/testdata/getmeshnodes_one_nonready_mesh_pod.yaml
diff --git a/pkg/controller/fixtures/mock.yaml b/pkg/controller/testdata/mock.yaml
similarity index 100%
rename from pkg/controller/fixtures/mock.yaml
rename to pkg/controller/testdata/mock.yaml
diff --git a/pkg/k8s/client_mock.go b/pkg/k8s/client_mock.go
index fb63ada..f59e644 100644
--- a/pkg/k8s/client_mock.go
+++ b/pkg/k8s/client_mock.go
@@ -82,7 +82,7 @@ type ClientMock struct {
 
 // NewClientMock create a new client mock.
 func NewClientMock(stopCh <-chan struct{}, path string, smi bool) *ClientMock {
-	yamlContent, err := ioutil.ReadFile(filepath.FromSlash("./fixtures/" + path))
+	yamlContent, err := ioutil.ReadFile(filepath.FromSlash("./testdata/" + path))
 	if err != nil {
 		panic(err)
 	}


Test patch:
diff --git a/integration/acl_disabled_test.go b/integration/acl_disabled_test.go
index 1b5d67a..d4fa8e8 100644
--- a/integration/acl_disabled_test.go
+++ b/integration/acl_disabled_test.go
@@ -19,8 +19,8 @@ func (s *ACLDisabledSuite) SetUpSuite(c *check.C) {
 	}
 	s.startk3s(c, requiredImages)
 	s.startAndWaitForCoreDNS(c)
-	s.createResources(c, "resources/state-table/")
-	s.createResources(c, "resources/smi/crds/")
+	s.createResources(c, "testdata/state-table/")
+	s.createResources(c, "testdata/smi/crds/")
 }
 
 func (s *ACLDisabledSuite) TearDownSuite(c *check.C) {
@@ -28,8 +28,8 @@ func (s *ACLDisabledSuite) TearDownSuite(c *check.C) {
 }
 
 func (s *ACLDisabledSuite) TestHTTPService(c *check.C) {
-	s.createResources(c, "resources/acl/disabled/http")
-	defer s.deleteResources(c, "resources/acl/disabled/http")
+	s.createResources(c, "testdata/acl/disabled/http")
+	defer s.deleteResources(c, "testdata/acl/disabled/http")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"server"})
@@ -40,7 +40,7 @@ func (s *ACLDisabledSuite) TestHTTPService(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/disabled/http.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/disabled/http.json")
 
 	serverSvc := s.getService(c, "server")
 	serverPod := s.getPod(c, "server")
@@ -51,8 +51,8 @@ func (s *ACLDisabledSuite) TestHTTPService(c *check.C) {
 }
 
 func (s *ACLDisabledSuite) TestTCPService(c *check.C) {
-	s.createResources(c, "resources/acl/disabled/tcp")
-	defer s.deleteResources(c, "resources/acl/disabled/tcp")
+	s.createResources(c, "testdata/acl/disabled/tcp")
+	defer s.deleteResources(c, "testdata/acl/disabled/tcp")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"server"})
@@ -63,7 +63,7 @@ func (s *ACLDisabledSuite) TestTCPService(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/disabled/tcp.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/disabled/tcp.json")
 
 	serverSvc := s.getService(c, "server")
 	serverPod := s.getPod(c, "server")
@@ -73,8 +73,8 @@ func (s *ACLDisabledSuite) TestTCPService(c *check.C) {
 }
 
 func (s *ACLDisabledSuite) TestUDPService(c *check.C) {
-	s.createResources(c, "resources/acl/disabled/udp")
-	defer s.deleteResources(c, "resources/acl/disabled/udp")
+	s.createResources(c, "testdata/acl/disabled/udp")
+	defer s.deleteResources(c, "testdata/acl/disabled/udp")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"server"})
@@ -85,7 +85,7 @@ func (s *ACLDisabledSuite) TestUDPService(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/disabled/udp.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/disabled/udp.json")
 
 	serverSvc := s.getService(c, "server")
 	serverPod := s.getPod(c, "server")
@@ -95,8 +95,8 @@ func (s *ACLDisabledSuite) TestUDPService(c *check.C) {
 }
 
 func (s *ACLDisabledSuite) TestSplitTraffic(c *check.C) {
-	s.createResources(c, "resources/acl/disabled/traffic-split")
-	defer s.deleteResources(c, "resources/acl/disabled/traffic-split")
+	s.createResources(c, "testdata/acl/disabled/traffic-split")
+	defer s.deleteResources(c, "testdata/acl/disabled/traffic-split")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"server-v1", "server-v2"})
@@ -107,7 +107,7 @@ func (s *ACLDisabledSuite) TestSplitTraffic(c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/disabled/traffic-split.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/disabled/traffic-split.json")
 
 	s.checkBlockAllMiddleware(c, config)
 	s.checkHTTPReadinessService(c, config)
diff --git a/integration/acl_enabled_test.go b/integration/acl_enabled_test.go
index a4dde40..fcb6183 100644
--- a/integration/acl_enabled_test.go
+++ b/integration/acl_enabled_test.go
@@ -19,8 +19,8 @@ func (s *ACLEnabledSuite) SetUpSuite(c *check.C) {
 	}
 	s.startk3s(c, requiredImages)
 	s.startAndWaitForCoreDNS(c)
-	s.createResources(c, "resources/state-table/")
-	s.createResources(c, "resources/smi/crds/")
+	s.createResources(c, "testdata/state-table/")
+	s.createResources(c, "testdata/smi/crds/")
 }
 
 func (s *ACLEnabledSuite) TearDownSuite(c *check.C) {
@@ -37,8 +37,8 @@ func (s *ACLEnabledSuite) TestTrafficTargetWithSMI(c *check.C) {
 }
 
 func (s *ACLEnabledSuite) testTrafficTarget(smi, acl bool, c *check.C) {
-	s.createResources(c, "resources/acl/enabled/traffic-target")
-	defer s.deleteResources(c, "resources/acl/enabled/traffic-target")
+	s.createResources(c, "testdata/acl/enabled/traffic-target")
+	defer s.deleteResources(c, "testdata/acl/enabled/traffic-target")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"client-a", "client-b", "server"})
@@ -49,7 +49,7 @@ func (s *ACLEnabledSuite) testTrafficTarget(smi, acl bool, c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/enabled/traffic-target.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/enabled/traffic-target.json")
 
 	svc := s.getService(c, "server")
 	tt := s.getTrafficTarget(c, "traffic-target")
@@ -72,8 +72,8 @@ func (s *ACLEnabledSuite) TestTrafficSplitSMIEnable(c *check.C) {
 }
 
 func (s *ACLEnabledSuite) testTrafficSplit(smi, acl bool, c *check.C) {
-	s.createResources(c, "resources/acl/enabled/traffic-split")
-	defer s.deleteResources(c, "resources/acl/enabled/traffic-split")
+	s.createResources(c, "testdata/acl/enabled/traffic-split")
+	defer s.deleteResources(c, "testdata/acl/enabled/traffic-split")
 	defer s.deleteShadowServices(c)
 
 	s.waitForPods(c, []string{"client-a", "client-b", "server-v1", "server-v2"})
@@ -84,7 +84,7 @@ func (s *ACLEnabledSuite) testTrafficSplit(smi, acl bool, c *check.C) {
 	c.Assert(err, checker.IsNil)
 	defer s.stopMaeshBinary(c, cmd.Process)
 
-	config := s.testConfigurationWithReturn(c, "resources/acl/enabled/traffic-split.json")
+	config := s.testConfigurationWithReturn(c, "testdata/acl/enabled/traffic-split.json")
 
 	s.checkBlockAllMiddleware(c, config)
 	s.checkHTTPReadinessService(c, config)
diff --git a/integration/coredns_test.go b/integration/coredns_test.go
index 5d81d0c..93cf332 100644
--- a/integration/coredns_test.go
+++ b/integration/coredns_test.go
@@ -23,8 +23,8 @@ func (s *CoreDNSSuite) SetUpSuite(c *check.C) {
 	s.startk3s(c, requiredImages)
 	s.startWhoami(c)
 	s.installTinyToolsMaesh(c)
-	s.createResources(c, "resources/state-table/")
-	s.createResources(c, "resources/smi/crds/")
+	s.createResources(c, "testdata/state-table/")
+	s.createResources(c, "testdata/smi/crds/")
 }
 
 func (s *CoreDNSSuite) TearDownSuite(c *check.C) {
@@ -54,8 +54,8 @@ func (s *CoreDNSSuite) TestCoreDNSVersionSafe(c *check.C) {
 		},
 	}
 
-	s.createResources(c, "resources/coredns/corednssafe.yaml")
-	defer s.deleteResources(c, "resources/coredns/corednssafe.yaml")
+	s.createResources(c, "testdata/coredns/corednssafe.yaml")
+	defer s.deleteResources(c, "testdata/coredns/corednssafe.yaml")
 
 	for _, test := range testCases {
 		s.WaitForCoreDNS(c)
@@ -91,8 +91,8 @@ func (s *CoreDNSSuite) TestCoreDNSVersion(c *check.C) {
 		},
 	}
 
-	s.createResources(c, "resources/coredns/coredns.yaml")
-	defer s.deleteResources(c, "resources/coredns/coredns.yaml")
+	s.createResources(c, "testdata/coredns/coredns.yaml")
+	defer s.deleteResources(c, "testdata/coredns/coredns.yaml")
 
 	for _, test := range testCases {
 		s.WaitForCoreDNS(c)
@@ -109,8 +109,8 @@ func (s *CoreDNSSuite) TestCoreDNSVersion(c *check.C) {
 }
 
 func (s *CoreDNSSuite) TestCoreDNSDig(c *check.C) {
-	s.createResources(c, "resources/coredns/coredns.yaml")
-	defer s.deleteResources(c, "resources/coredns/coredns.yaml")
+	s.createResources(c, "testdata/coredns/coredns.yaml")
+	defer s.deleteResources(c, "testdata/coredns/coredns.yaml")
 	s.WaitForCoreDNS(c)
 
 	cmd := s.startMaeshBinaryCmd(c, false, false)
diff --git a/integration/helm_test.go b/integration/helm_test.go
index b1e97ac..b321793 100644
--- a/integration/helm_test.go
+++ b/integration/helm_test.go
@@ -16,7 +16,7 @@ func (s *HelmSuite) SetUpSuite(c *check.C) {
 	s.startk3s(c, requiredImages)
 	s.startAndWaitForCoreDNS(c)
 	s.startWhoami(c)
-	s.createResources(c, "resources/smi/crds/")
+	s.createResources(c, "testdata/smi/crds/")
 }
 
 func (s *HelmSuite) TearDownSuite(c *check.C) {
diff --git a/integration/integration_test.go b/integration/integration_test.go
index d2f896b..92c5c3e 100644
--- a/integration/integration_test.go
+++ b/integration/integration_test.go
@@ -294,7 +294,7 @@ func (s *BaseSuite) waitForPods(c *check.C, pods []string) {
 }
 
 func (s *BaseSuite) startAndWaitForCoreDNS(c *check.C) {
-	s.createResources(c, "resources/coredns/coredns.yaml")
+	s.createResources(c, "testdata/coredns/coredns.yaml")
 	s.WaitForCoreDNS(c)
 }
 
@@ -303,7 +303,7 @@ func (s *BaseSuite) WaitForCoreDNS(c *check.C) {
 }
 
 func (s *BaseSuite) startAndWaitForKubeDNS(c *check.C) {
-	s.createResources(c, "resources/kubedns")
+	s.createResources(c, "testdata/kubedns")
 	c.Assert(s.try.WaitReadyDeployment("kube-dns", metav1.NamespaceSystem, 60*time.Second), checker.IsNil)
 }
 
@@ -328,7 +328,7 @@ func (s *BaseSuite) waitKubectlExecCommandReturn(_ *check.C, argSlice []string)
 }
 
 func (s *BaseSuite) startWhoami(c *check.C) {
-	s.createResources(c, "resources/whoami")
+	s.createResources(c, "testdata/whoami")
 	c.Assert(s.try.WaitReadyDeployment("whoami", "whoami", 30*time.Second), checker.IsNil)
 }
 
@@ -344,7 +344,7 @@ func (s *BaseSuite) createRequiredNamespaces(c *check.C) {
 func (s *BaseSuite) installHelmMaesh(c *check.C, acl bool, kubeDNS bool) error {
 	c.Log("Installing Maesh via helm...")
 	// Install the helm chart.
-	argSlice := []string{"install", "powpow", "../helm/chart/maesh", "--values", "resources/values.yaml", "--namespace", maeshNamespace}
+	argSlice := []string{"install", "powpow", "../helm/chart/maesh", "--values", "testdata/values.yaml", "--namespace", maeshNamespace}
 
 	if kubeDNS {
 		argSlice = append(argSlice, "--set", "kubedns=true")
@@ -389,7 +389,7 @@ func (s *BaseSuite) setCoreDNSVersion(c *check.C, version string) {
 
 func (s *BaseSuite) installTinyToolsMaesh(c *check.C) {
 	// Create new tiny tools deployment.
-	s.kubectlCommand(c, "apply", "-f", path.Join(s.dir, "resources/tools/deployment.yaml"))
+	s.kubectlCommand(c, "apply", "-f", path.Join(s.dir, "testdata/tools/deployment.yaml"))
 
 	// Wait for tools to be initialized.
 	s.waitForTools(c)
diff --git a/pkg/k8s/fixtures/mock.yaml b/pkg/k8s/testdata/mock.yaml
similarity index 100%
rename from pkg/k8s/fixtures/mock.yaml
rename to pkg/k8s/testdata/mock.yaml
diff --git a/pkg/prepare/fixtures/checkdnsprovider_kubedns.yaml b/pkg/prepare/testdata/checkdnsprovider_kubedns.yaml
similarity index 100%
rename from pkg/prepare/fixtures/checkdnsprovider_kubedns.yaml
rename to pkg/prepare/testdata/checkdnsprovider_kubedns.yaml
diff --git a/pkg/prepare/fixtures/checkdnsprovider_no_provider.yaml b/pkg/prepare/testdata/checkdnsprovider_no_provider.yaml
similarity index 100%
rename from pkg/prepare/fixtures/checkdnsprovider_no_provider.yaml
rename to pkg/prepare/testdata/checkdnsprovider_no_provider.yaml
diff --git a/pkg/prepare/fixtures/checkdnsprovider_supported_version.yaml b/pkg/prepare/testdata/checkdnsprovider_supported_version.yaml
similarity index 100%
rename from pkg/prepare/fixtures/checkdnsprovider_supported_version.yaml
rename to pkg/prepare/testdata/checkdnsprovider_supported_version.yaml
diff --git a/pkg/prepare/fixtures/checkdnsprovider_unsupported_version.yaml b/pkg/prepare/testdata/checkdnsprovider_unsupported_version.yaml
similarity index 100%
rename from pkg/prepare/fixtures/checkdnsprovider_unsupported_version.yaml
rename to pkg/prepare/testdata/checkdnsprovider_unsupported_version.yaml
diff --git a/pkg/prepare/fixtures/configurecoredns_already_patched.yaml b/pkg/prepare/testdata/configurecoredns_already_patched.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurecoredns_already_patched.yaml
rename to pkg/prepare/testdata/configurecoredns_already_patched.yaml
diff --git a/pkg/prepare/fixtures/configurecoredns_missing_configmap.yaml b/pkg/prepare/testdata/configurecoredns_missing_configmap.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurecoredns_missing_configmap.yaml
rename to pkg/prepare/testdata/configurecoredns_missing_configmap.yaml
diff --git a/pkg/prepare/fixtures/configurecoredns_missing_deployment.yaml b/pkg/prepare/testdata/configurecoredns_missing_deployment.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurecoredns_missing_deployment.yaml
rename to pkg/prepare/testdata/configurecoredns_missing_deployment.yaml
diff --git a/pkg/prepare/fixtures/configurecoredns_not_patched.yaml b/pkg/prepare/testdata/configurecoredns_not_patched.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurecoredns_not_patched.yaml
rename to pkg/prepare/testdata/configurecoredns_not_patched.yaml
diff --git a/pkg/prepare/fixtures/configurekubedns_already_patched.yaml b/pkg/prepare/testdata/configurekubedns_already_patched.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurekubedns_already_patched.yaml
rename to pkg/prepare/testdata/configurekubedns_already_patched.yaml
diff --git a/pkg/prepare/fixtures/configurekubedns_missing_deployment.yaml b/pkg/prepare/testdata/configurekubedns_missing_deployment.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurekubedns_missing_deployment.yaml
rename to pkg/prepare/testdata/configurekubedns_missing_deployment.yaml
diff --git a/pkg/prepare/fixtures/configurekubedns_not_patched.yaml b/pkg/prepare/testdata/configurekubedns_not_patched.yaml
similarity index 100%
rename from pkg/prepare/fixtures/configurekubedns_not_patched.yaml
rename to pkg/prepare/testdata/configurekubedns_not_patched.yaml
diff --git a/pkg/provider/provider_test.go b/pkg/provider/provider_test.go
index 2c89265..6a99e98 100644
--- a/pkg/provider/provider_test.go
+++ b/pkg/provider/provider_test.go
@@ -40,22 +40,22 @@ func TestProvider_BuildConfig(t *testing.T) {
 			udpStateTable: map[mk8s.ServiceWithPort]int32{
 				{Namespace: "my-ns", Name: "svc-b", Port: 8080}: 15000,
 			},
-			topology:   "fixtures/annotations-traffic-type-topology.json",
-			wantConfig: "fixtures/annotations-traffic-type-config.json",
+			topology:   "testdata/annotations-traffic-type-topology.json",
+			wantConfig: "testdata/annotations-traffic-type-config.json",
 		},
 		{
 			desc:               "Annotations: scheme",
 			acl:                false,
 			defaultTrafficType: "http",
-			topology:           "fixtures/annotations-scheme-topology.json",
-			wantConfig:         "fixtures/annotations-scheme-config.json",
+			topology:           "testdata/annotations-scheme-topology.json",
+			wantConfig:         "testdata/annotations-scheme-config.json",
 		},
 		{
 			desc:               "ACL disabled: basic HTTP service",
 			acl:                false,
 			defaultTrafficType: "http",
-			topology:           "fixtures/acl-disabled-http-basic-topology.json",
-			wantConfig:         "fixtures/acl-disabled-http-basic-config.json",
+			topology:           "testdata/acl-disabled-http-basic-topology.json",
+			wantConfig:         "testdata/acl-disabled-http-basic-config.json",
 		},
 		{
 			desc:               "ACL disabled: basic TCP service",
@@ -64,8 +64,8 @@ func TestProvider_BuildConfig(t *testing.T) {
 			tcpStateTable: map[mk8s.ServiceWithPort]int32{
 				{Namespace: "my-ns", Name: "svc-a", Port: 8080}: 5000,
 			},
-			topology:   "fixtures/acl-disabled-tcp-basic-topology.json",
-			wantConfig: "fixtures/acl-disabled-tcp-basic-config.json",
+			topology:   "testdata/acl-disabled-tcp-basic-topology.json",
+			wantConfig: "testdata/acl-disabled-tcp-basic-config.json",
 		},
 		{
 			desc:               "ACL disabled: basic UDP service",
@@ -74,22 +74,22 @@ func TestProvider_BuildConfig(t *testing.T) {
 			udpStateTable: map[mk8s.ServiceWithPort]int32{
 				{Namespace: "my-ns", Name: "svc-a", Port: 8080}: 15000,
 			},
-			topology:   "fixtures/acl-disabled-udp-basic-topology.json",
-			wantConfig: "fixtures/acl-disabled-udp-basic-config.json",
+			topology:   "testdata/acl-disabled-udp-basic-topology.json",
+			wantConfig: "testdata/acl-disabled-udp-basic-config.json",
 		},
 		{
 			desc:               "ACL disabled: HTTP service with traffic-split",
 			acl:                false,
 			defaultTrafficType: "http",
-			topology:           "fixtures/acl-disabled-http-traffic-split-topology.json",
-			wantConfig:         "fixtures/acl-disabled-http-traffic-split-config.json",
+			topology:           "testdata/acl-disabled-http-traffic-split-topology.json",
+			wantConfig:         "testdata/acl-disabled-http-traffic-split-config.json",
 		},
 		{
 			desc:               "ACL enabled: basic HTTP service",
 			acl:                true,
 			defaultTrafficType: "http",
-			topology:           "fixtures/acl-enabled-http-basic-topology.json",
-			wantConfig:         "fixtures/acl-enabled-http-basic-config.json",
+			topology:           "testdata/acl-enabled-http-basic-topology.json",
+			wantConfig:         "testdata/acl-enabled-http-basic-config.json",
 		},
 		{
 			desc:               "ACL enabled: basic TCP service",
@@ -98,15 +98,15 @@ func TestProvider_BuildConfig(t *testing.T) {
 			tcpStateTable: map[mk8s.ServiceWithPort]int32{
 				{Namespace: "my-ns", Name: "svc-b", Port: 8080}: 5000,
 			},
-			topology:   "fixtures/acl-enabled-tcp-basic-topology.json",
-			wantConfig: "fixtures/acl-enabled-tcp-basic-config.json",
+			topology:   "testdata/acl-enabled-tcp-basic-topology.json",
+			wantConfig: "testdata/acl-enabled-tcp-basic-config.json",
 		},
 		{
 			desc:               "ACL enabled: HTTP service with traffic-split",
 			acl:                true,
 			defaultTrafficType: "http",
-			topology:           "fixtures/acl-enabled-http-traffic-split-topology.json",
-			wantConfig:         "fixtures/acl-enabled-http-traffic-split-config.json",
+			topology:           "testdata/acl-enabled-http-traffic-split-topology.json",
+			wantConfig:         "testdata/acl-enabled-http-traffic-split-config.json",
 		},
 	}
 
diff --git a/pkg/provider/fixtures/acl-disabled-http-basic-config.json b/pkg/provider/testdata/acl-disabled-http-basic-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-http-basic-config.json
rename to pkg/provider/testdata/acl-disabled-http-basic-config.json
diff --git a/pkg/provider/fixtures/acl-disabled-http-basic-topology.json b/pkg/provider/testdata/acl-disabled-http-basic-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-http-basic-topology.json
rename to pkg/provider/testdata/acl-disabled-http-basic-topology.json
diff --git a/pkg/provider/fixtures/acl-disabled-http-traffic-split-config.json b/pkg/provider/testdata/acl-disabled-http-traffic-split-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-http-traffic-split-config.json
rename to pkg/provider/testdata/acl-disabled-http-traffic-split-config.json
diff --git a/pkg/provider/fixtures/acl-disabled-http-traffic-split-topology.json b/pkg/provider/testdata/acl-disabled-http-traffic-split-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-http-traffic-split-topology.json
rename to pkg/provider/testdata/acl-disabled-http-traffic-split-topology.json
diff --git a/pkg/provider/fixtures/acl-disabled-tcp-basic-config.json b/pkg/provider/testdata/acl-disabled-tcp-basic-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-tcp-basic-config.json
rename to pkg/provider/testdata/acl-disabled-tcp-basic-config.json
diff --git a/pkg/provider/fixtures/acl-disabled-tcp-basic-topology.json b/pkg/provider/testdata/acl-disabled-tcp-basic-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-tcp-basic-topology.json
rename to pkg/provider/testdata/acl-disabled-tcp-basic-topology.json
diff --git a/pkg/provider/fixtures/acl-disabled-udp-basic-config.json b/pkg/provider/testdata/acl-disabled-udp-basic-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-udp-basic-config.json
rename to pkg/provider/testdata/acl-disabled-udp-basic-config.json
diff --git a/pkg/provider/fixtures/acl-disabled-udp-basic-topology.json b/pkg/provider/testdata/acl-disabled-udp-basic-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-disabled-udp-basic-topology.json
rename to pkg/provider/testdata/acl-disabled-udp-basic-topology.json
diff --git a/pkg/provider/fixtures/acl-enabled-http-basic-config.json b/pkg/provider/testdata/acl-enabled-http-basic-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-http-basic-config.json
rename to pkg/provider/testdata/acl-enabled-http-basic-config.json
diff --git a/pkg/provider/fixtures/acl-enabled-http-basic-topology.json b/pkg/provider/testdata/acl-enabled-http-basic-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-http-basic-topology.json
rename to pkg/provider/testdata/acl-enabled-http-basic-topology.json
diff --git a/pkg/provider/fixtures/acl-enabled-http-traffic-split-config.json b/pkg/provider/testdata/acl-enabled-http-traffic-split-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-http-traffic-split-config.json
rename to pkg/provider/testdata/acl-enabled-http-traffic-split-config.json
diff --git a/pkg/provider/fixtures/acl-enabled-http-traffic-split-topology.json b/pkg/provider/testdata/acl-enabled-http-traffic-split-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-http-traffic-split-topology.json
rename to pkg/provider/testdata/acl-enabled-http-traffic-split-topology.json
diff --git a/pkg/provider/fixtures/acl-enabled-tcp-basic-config.json b/pkg/provider/testdata/acl-enabled-tcp-basic-config.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-tcp-basic-config.json
rename to pkg/provider/testdata/acl-enabled-tcp-basic-config.json
diff --git a/pkg/provider/fixtures/acl-enabled-tcp-basic-topology.json b/pkg/provider/testdata/acl-enabled-tcp-basic-topology.json
similarity index 100%
rename from pkg/provider/fixtures/acl-enabled-tcp-basic-topology.json
rename to pkg/provider/testdata/acl-enabled-tcp-basic-topology.json
diff --git a/pkg/provider/fixtures/annotations-scheme-config.json b/pkg/provider/testdata/annotations-scheme-config.json
similarity index 100%
rename from pkg/provider/fixtures/annotations-scheme-config.json
rename to pkg/provider/testdata/annotations-scheme-config.json
diff --git a/pkg/provider/fixtures/annotations-scheme-topology.json b/pkg/provider/testdata/annotations-scheme-topology.json
similarity index 100%
rename from pkg/provider/fixtures/annotations-scheme-topology.json
rename to pkg/provider/testdata/annotations-scheme-topology.json
diff --git a/pkg/provider/fixtures/annotations-traffic-type-config.json b/pkg/provider/testdata/annotations-traffic-type-config.json
similarity index 100%
rename from pkg/provider/fixtures/annotations-traffic-type-config.json
rename to pkg/provider/testdata/annotations-traffic-type-config.json
diff --git a/pkg/provider/fixtures/annotations-traffic-type-topology.json b/pkg/provider/testdata/annotations-traffic-type-topology.json
similarity index 100%
rename from pkg/provider/fixtures/annotations-traffic-type-topology.json
rename to pkg/provider/testdata/annotations-traffic-type-topology.json
diff --git a/pkg/topology/builder_test.go b/pkg/topology/builder_test.go
index 7951778..752b42e 100644
--- a/pkg/topology/builder_test.go
+++ b/pkg/topology/builder_test.go
@@ -350,7 +350,7 @@ func TestTopologyBuilder_BuildWithTrafficTargetAndTrafficSplit(t *testing.T) {
 	got, err := builder.Build(ignoredResources)
 	require.NoError(t, err)
 
-	assertTopology(t, "fixtures/topology-basic.json", got)
+	assertTopology(t, "testdata/topology-basic.json", got)
 }
 
 // TestTopologyBuilder_BuildWithTrafficTargetSpecEmptyMatch makes sure that when TrafficTarget.Spec.Matches is empty,
@@ -389,7 +389,7 @@ func TestTopologyBuilder_BuildWithTrafficTargetSpecEmptyMatch(t *testing.T) {
 	got, err := builder.Build(ignoredResources)
 	require.NoError(t, err)
 
-	assertTopology(t, "fixtures/topology-spec-with-empty-match.json", got)
+	assertTopology(t, "testdata/topology-spec-with-empty-match.json", got)
 }
 
 // TestTopologyBuilder_BuildWithTrafficTargetEmptyDestinationPort makes sure that when a TrafficTarget.Destination.Port
@@ -431,7 +431,7 @@ func TestTopologyBuilder_BuildWithTrafficTargetEmptyDestinationPort(t *testing.T
 	got, err := builder.Build(ignoredResources)
 	require.NoError(t, err)
 
-	assertTopology(t, "fixtures/topology-empty-destination-port.json", got)
+	assertTopology(t, "testdata/topology-empty-destination-port.json", got)
 }
 
 // TestTopologyBuilder_BuildTrafficTargetMultipleSourcesAndDestinations makes sure we can build a topology with
@@ -470,7 +470,7 @@ func TestTopologyBuilder_BuildTrafficTargetMultipleSourcesAndDestinations(t *tes
 	got, err := builder.Build(ignoredResources)
 	require.NoError(t, err)
 
-	assertTopology(t, "fixtures/topology-multi-sources-destinations.json", got)
+	assertTopology(t, "testdata/topology-multi-sources-destinations.json", got)
 }
 
 // createBuilder initializes the different k8s factories and start them, initializes listers and create