diff --git a/internal/auth-service/auth_service_suite_test.go b/internal/auth-service/auth_service_suite_test.go index 30ed750c23..60b51ebe3d 100644 --- a/internal/auth-service/auth_service_suite_test.go +++ b/internal/auth-service/auth_service_suite_test.go @@ -60,7 +60,7 @@ var _ = BeforeSuite(func() { _ = tMan.createToken() var err error - cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds")}) + cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).ToNot(HaveOccurred()) informerFactory := informers.NewSharedInformerFactoryWithOptions(cluster.GetClient(), 300*time.Second, informers.WithNamespace("default")) diff --git a/internal/crdReplicator/crdReplicator_suite_test.go b/internal/crdReplicator/crdReplicator_suite_test.go index 8ddd26313f..c19720e59c 100644 --- a/internal/crdReplicator/crdReplicator_suite_test.go +++ b/internal/crdReplicator/crdReplicator_suite_test.go @@ -80,7 +80,9 @@ var _ = BeforeSuite(func() { ctx, cancel = context.WithCancel(context.Background()) // The same cluster is used both as local and remote, using different namespaces. - clsrt, mgr, err := testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds")}) + clsrt, mgr, err := testutil.NewTestCluster([]string{ + filepath.Join("..", "..", "deployments", "liqo", "charts", "liqo-crds", "crds"), + }) Expect(err).ToNot(HaveOccurred()) cluster = clsrt diff --git a/internal/liqonet/network-manager/netcfgcreator/netcfgcreator_suite_test.go b/internal/liqonet/network-manager/netcfgcreator/netcfgcreator_suite_test.go index 8a78dd23fe..ab7d319799 100644 --- a/internal/liqonet/network-manager/netcfgcreator/netcfgcreator_suite_test.go +++ b/internal/liqonet/network-manager/netcfgcreator/netcfgcreator_suite_test.go @@ -35,7 +35,7 @@ func TestForeignclusterwatcher(t *testing.T) { var _ = BeforeSuite(func() { testutil.LogsToGinkgoWriter() - clstr, _, err := testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "..", "deployments", "liqo", "crds")}) + clstr, _, err := testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).ToNot(HaveOccurred()) testcluster = clstr diff --git a/internal/liqonet/route-operator/overlayOperator_test.go b/internal/liqonet/route-operator/overlayOperator_test.go index 36bf1a6422..f1d927453c 100644 --- a/internal/liqonet/route-operator/overlayOperator_test.go +++ b/internal/liqonet/route-operator/overlayOperator_test.go @@ -393,7 +393,7 @@ func setupOverlayTestEnv() error { return err } overlayEnvTest = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, } config, err := overlayEnvTest.Start() if err != nil { diff --git a/internal/liqonet/tunnel-operator/tunnel_operator_suite_test.go b/internal/liqonet/tunnel-operator/tunnel_operator_suite_test.go index 43e7109cdf..25c15ac7ff 100644 --- a/internal/liqonet/tunnel-operator/tunnel_operator_suite_test.go +++ b/internal/liqonet/tunnel-operator/tunnel_operator_suite_test.go @@ -120,7 +120,7 @@ var _ = BeforeSuite(func() { err = netv1alpha1.AddToScheme(scheme.Scheme) Expect(err).ShouldNot(HaveOccurred()) envTest = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, } config, err := envTest.Start() Expect(err).ShouldNot(HaveOccurred()) diff --git a/pkg/identityManager/identityManager_suite_test.go b/pkg/identityManager/identityManager_suite_test.go index d282fec9cd..6a4e7e9c57 100644 --- a/pkg/identityManager/identityManager_suite_test.go +++ b/pkg/identityManager/identityManager_suite_test.go @@ -90,7 +90,7 @@ var _ = BeforeSuite(func() { }, remoteCluster.ClusterID) var err error - cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds")}) + cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).ToNot(HaveOccurred()) client = cluster.GetClient() diff --git a/pkg/liqo-controller-manager/foreign-cluster-operator/foreign-cluster-operator_test.go b/pkg/liqo-controller-manager/foreign-cluster-operator/foreign-cluster-operator_test.go index fa69f841b0..3412eb368a 100644 --- a/pkg/liqo-controller-manager/foreign-cluster-operator/foreign-cluster-operator_test.go +++ b/pkg/liqo-controller-manager/foreign-cluster-operator/foreign-cluster-operator_test.go @@ -81,7 +81,7 @@ var _ = Describe("ForeignClusterOperator", func() { ctx, cancel = context.WithCancel(context.Background()) var err error - cluster, mgr, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}) + cluster, mgr, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) if err != nil { By(err.Error()) os.Exit(1) diff --git a/pkg/liqo-controller-manager/namespaceoffloading-controller/suite_test.go b/pkg/liqo-controller-manager/namespaceoffloading-controller/suite_test.go index 4b08258dc6..7c8408015a 100644 --- a/pkg/liqo-controller-manager/namespaceoffloading-controller/suite_test.go +++ b/pkg/liqo-controller-manager/namespaceoffloading-controller/suite_test.go @@ -131,7 +131,7 @@ var _ = BeforeSuite(func() { testutil.LogsToGinkgoWriter() homeClusterEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, } var err error diff --git a/pkg/liqo-controller-manager/resource-request-controller/suite_test.go b/pkg/liqo-controller-manager/resource-request-controller/suite_test.go index a9d8fb8ffc..dfb908040a 100644 --- a/pkg/liqo-controller-manager/resource-request-controller/suite_test.go +++ b/pkg/liqo-controller-manager/resource-request-controller/suite_test.go @@ -63,7 +63,7 @@ func createCluster() { ctx, cancel = context.WithCancel(context.Background()) testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{ - filepath.Join("..", "..", "..", "deployments", "liqo", "crds"), + filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds"), }, } diff --git a/pkg/liqo-controller-manager/resourceoffer-controller/resourceoffer_controller_test.go b/pkg/liqo-controller-manager/resourceoffer-controller/resourceoffer_controller_test.go index 0c9f6df3f7..60144cde0e 100644 --- a/pkg/liqo-controller-manager/resourceoffer-controller/resourceoffer_controller_test.go +++ b/pkg/liqo-controller-manager/resourceoffer-controller/resourceoffer_controller_test.go @@ -107,7 +107,7 @@ var _ = Describe("ResourceOffer Controller", func() { BeforeEach(func() { var err error - cluster, mgr, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}) + cluster, mgr, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) if err != nil { By(err.Error()) os.Exit(1) diff --git a/pkg/liqo-controller-manager/shadowpod-controller/suite_test.go b/pkg/liqo-controller-manager/shadowpod-controller/suite_test.go index de64eb789b..99956ed601 100644 --- a/pkg/liqo-controller-manager/shadowpod-controller/suite_test.go +++ b/pkg/liqo-controller-manager/shadowpod-controller/suite_test.go @@ -42,7 +42,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, ErrorIfCRDPathMissing: true, } cfg, err := testEnv.Start() diff --git a/pkg/liqo-controller-manager/virtualnode-controller/suite_test.go b/pkg/liqo-controller-manager/virtualnode-controller/suite_test.go index 921eb653a5..2376fd6f9b 100644 --- a/pkg/liqo-controller-manager/virtualnode-controller/suite_test.go +++ b/pkg/liqo-controller-manager/virtualnode-controller/suite_test.go @@ -92,7 +92,7 @@ func TestVirtualNode(t *testing.T) { var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, } ctx, cancel = context.WithCancel(context.Background()) diff --git a/pkg/tenantNamespace/tenantNamespace_suite_test.go b/pkg/tenantNamespace/tenantNamespace_suite_test.go index cc87ab2485..0bc1d7fa06 100644 --- a/pkg/tenantNamespace/tenantNamespace_suite_test.go +++ b/pkg/tenantNamespace/tenantNamespace_suite_test.go @@ -50,7 +50,7 @@ var _ = BeforeSuite(func() { } var err error - cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds")}) + cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).ToNot(HaveOccurred()) namespaceManager = NewCachedManager(ctx, cluster.GetClient()) diff --git a/pkg/utils/authenticationtoken/authenticationtoken_test.go b/pkg/utils/authenticationtoken/authenticationtoken_test.go index 3e190079a7..f9a57f797d 100644 --- a/pkg/utils/authenticationtoken/authenticationtoken_test.go +++ b/pkg/utils/authenticationtoken/authenticationtoken_test.go @@ -50,7 +50,7 @@ func createCluster() { ctx, cancel = context.WithCancel(context.Background()) testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{ - filepath.Join("..", "..", "..", "deployments", "liqo", "crds"), + filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds"), }, } diff --git a/pkg/utils/csr/suite_test.go b/pkg/utils/csr/suite_test.go index 1a44d20048..c5002adae3 100644 --- a/pkg/utils/csr/suite_test.go +++ b/pkg/utils/csr/suite_test.go @@ -40,7 +40,7 @@ var ( var _ = BeforeSuite(func() { ctx, cancel = context.WithCancel(context.Background()) - cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}) + cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).To(BeNil()) }) diff --git a/pkg/virtualKubelet/liqoNodeProvider/nodeProvider_test.go b/pkg/virtualKubelet/liqoNodeProvider/nodeProvider_test.go index c21e58fd5c..838dddfd3d 100644 --- a/pkg/virtualKubelet/liqoNodeProvider/nodeProvider_test.go +++ b/pkg/virtualKubelet/liqoNodeProvider/nodeProvider_test.go @@ -72,7 +72,7 @@ var _ = Describe("NodeProvider", func() { BeforeEach(func() { ctx, cancel = context.WithCancel(context.Background()) - cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds")}) + cluster, _, err = testutil.NewTestCluster([]string{filepath.Join("..", "..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}) Expect(err).To(BeNil()) client := kubernetes.NewForConfigOrDie(cluster.GetCfg()) diff --git a/test/integration/integration_suite_test.go b/test/integration/integration_suite_test.go index 2491a79872..6730c6f1a2 100644 --- a/test/integration/integration_suite_test.go +++ b/test/integration/integration_suite_test.go @@ -141,7 +141,7 @@ func initNatMappingController() error { return err } envTest = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "deployments", "liqo", "crds")}, + CRDDirectoryPaths: []string{filepath.Join("..", "..", "deployments", "liqo", "crds", "charts", "liqo-crds", "crds")}, } config, err := envTest.Start() if err != nil {