diff --git a/cp_mod_migration_suite_test.go b/cp_mod_migration_suite_test.go index e98c83b..7f732b1 100644 --- a/cp_mod_migration_suite_test.go +++ b/cp_mod_migration_suite_test.go @@ -17,9 +17,10 @@ import ( func TestCproxy(t *testing.T) { RegisterFailHandler(Fail) - defer GinkgoRecover() - Expect(loadCMs(&cms)).ShouldNot(HaveOccurred(), "unable to load test data") + if err := loadCMs(&cms); err != nil { + t.Fatal(err) + } mockedClient = newClient(t, cms) RunSpecs(t, "Cproxy Suite") diff --git a/cp_mod_migration_test.go b/cp_mod_migration_test.go index 8d2ab7a..13ff408 100644 --- a/cp_mod_migration_test.go +++ b/cp_mod_migration_test.go @@ -60,6 +60,10 @@ var _ = Describe("cp-mod-migrator", Ordered, func() { var cr v294.ConnectivityProxy err := extract.GetCPConfiguration(ctx, &cr, mockedClient) Expect(err).ShouldNot(HaveOccurred()) + + err = extract.SetDefaults(ctx, &cr, mockedClient) + Expect(err).ShouldNot(HaveOccurred()) + Expect(k8sClient.Create(ctx, &cr)).ShouldNot(HaveOccurred()) deleteObjs(ctx, &cr) } diff --git a/cp_mod_migration_utilz_test.go b/cp_mod_migration_utilz_test.go index 05a3e19..21df392 100644 --- a/cp_mod_migration_utilz_test.go +++ b/cp_mod_migration_utilz_test.go @@ -81,7 +81,7 @@ func cp(name, namespace string) v294.ConnectivityProxy { } func loadCMs(data *[]corev1.ConfigMap) error { - file, err := os.Open("../../hack/testdata/configmaps.yaml") + file, err := os.Open("./hack/testdata/configmaps.yaml") if err != nil { return err }