From ae3d3463ed5e858a0c27ece1ec5e1c1a926de717 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Fri, 30 Jan 2026 09:01:10 -0500 Subject: [PATCH 1/6] chore: fix intermittent fail in 1-040 Signed-off-by: Jonathan West --- ...0_validate_quoted_RBAC_group_names_test.go | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/test/openshift/e2e/ginkgo/sequential/1-040_validate_quoted_RBAC_group_names_test.go b/test/openshift/e2e/ginkgo/sequential/1-040_validate_quoted_RBAC_group_names_test.go index 3263a162e..7dcb095fb 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-040_validate_quoted_RBAC_group_names_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-040_validate_quoted_RBAC_group_names_test.go @@ -1,6 +1,8 @@ package sequential import ( + "strings" + . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture" @@ -16,11 +18,24 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }) AfterEach(func() { + + // Delete the new role we created during the test + defer func() { + By("deleting the role we created during the test") + _, err := argocdFixture.RunArgoCDCLI("proj", "role", "delete", "default", "somerole") + Expect(err).ToNot(HaveOccurred()) + }() + fixture.OutputDebugOnFail() + }) It("creates a project role 'somerole' and group claim, and verifies group claim contains the expected data", func() { + defaultArgoCD, err := argocdFixture.GetOpenShiftGitOpsNSArgoCD() + Expect(err).ToNot(HaveOccurred()) + Eventually(defaultArgoCD, "5m", "5s").Should(argocdFixture.BeAvailable()) + By("logging in to Argo CD instance") Expect(argocdFixture.LogInToDefaultArgoCDInstance()).To(Succeed()) @@ -28,15 +43,20 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { output, err := argocdFixture.RunArgoCDCLI("proj", "role", "create", "default", "somerole") Expect(err).ToNot(HaveOccurred()) - // Delete the new role we created during the test - defer func() { - By("deleting the role we created during the test") - _, err = argocdFixture.RunArgoCDCLI("proj", "role", "delete", "default", "somerole") - Expect(err).ToNot(HaveOccurred()) - }() - Expect(output).To(ContainSubstring("Role 'somerole' created")) + By("waiting for Argo CD to verify the role exists before we add to it (there seems to be some kind of intermittent race condition here in Argo CD itself, where create succeeds in the previous step, but we received 503 in the next step)") + Eventually(func() bool { + output, err := argocdFixture.RunArgoCDCLI("proj", "role", "get", "default", "somerole") + if err != nil { + GinkgoWriter.Println("error:", err) + return false + } + + return strings.Contains(output, "Role Name:") + + }, "30s", "5s").Should(BeTrue()) + By("adding a group claim to the somerole role") output, err = argocdFixture.RunArgoCDCLI("proj", "role", "add-group", "default", "somerole", "\"CN=foo,OU=bar,O=baz\"") Expect(err).ToNot(HaveOccurred()) From 6267b2773e231480913aebc0a20e2d5e703f054d Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Mon, 2 Feb 2026 14:56:02 -0500 Subject: [PATCH 2/6] chore: increase timeout on waiting for nginx deployment on 1-027 Signed-off-by: Jonathan West --- .../sequential/1-027_validate_operand_from_git_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go b/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go index 3a16a48fb..2e808ef33 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go @@ -141,9 +141,9 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { deploymentsShouldExist := []string{"argocd-redis", "argocd-server", "argocd-repo-server", "nginx-deployment"} for _, depl := range deploymentsShouldExist { depl := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: depl, Namespace: test_1_27_customNS.Name}} - Eventually(depl).Should(k8sFixture.ExistByName()) - Eventually(depl).Should(deploymentFixture.HaveReplicas(1)) - Eventually(depl).Should(deploymentFixture.HaveReadyReplicas(1)) + Eventually(depl, "4m", "5s").Should(k8sFixture.ExistByName()) + Eventually(depl, "4m", "5s").Should(deploymentFixture.HaveReplicas(1)) + Eventually(depl, "4m", "5s").Should(deploymentFixture.HaveReadyReplicas(1)) } statefulSet := &appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{Name: "argocd-application-controller", Namespace: test_1_27_customNS.Name}} From 0335f853e66b8797e4191fa35dbdf99b82e036a0 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Tue, 3 Feb 2026 13:36:02 -0500 Subject: [PATCH 3/6] chore: add debug hooks to additional tests Signed-off-by: Jonathan West --- ...lidate-ootb-manage-other-namespace_test.go | 26 +++++++--- ...date_handle_terminating_namespaces_test.go | 52 +++++++++++++------ 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/test/openshift/e2e/ginkgo/sequential/1-010_validate-ootb-manage-other-namespace_test.go b/test/openshift/e2e/ginkgo/sequential/1-010_validate-ootb-manage-other-namespace_test.go index 9ea7ea171..90f2fe58b 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-010_validate-ootb-manage-other-namespace_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-010_validate-ootb-manage-other-namespace_test.go @@ -41,8 +41,11 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-010_validate-ootb-manage-other-namespace", func() { var ( - ctx context.Context - k8sClient client.Client + ctx context.Context + k8sClient client.Client + nsTest_1_10_custom *corev1.Namespace + nsCleanupFunc func() + app *argocdv1alpha1.Application ) BeforeEach(func() { @@ -51,11 +54,21 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + fixture.OutputDebugOnFail(nsTest_1_10_custom, "openshift-gitops") + + if nsCleanupFunc != nil { + nsCleanupFunc() + } + if app != nil { + _ = k8sClient.Delete(ctx, app) + } + }) + It("verifies that openshift-gitops Argo CD instance is able to manage/unmanage other namespaces via managed-by label", func() { By("creating a new namespace that is managed by openshift-gitops Argo CD instance") - nsTest_1_10_custom, cleanupFunc1 := fixture.CreateManagedNamespaceWithCleanupFunc("test-1-10-custom", "openshift-gitops") - defer cleanupFunc1() + nsTest_1_10_custom, nsCleanupFunc = fixture.CreateManagedNamespaceWithCleanupFunc("test-1-10-custom", "openshift-gitops") openshiftgitopsArgoCD, err := argocdFixture.GetOpenShiftGitOpsNSArgoCD() Expect(err).ToNot(HaveOccurred()) @@ -91,7 +104,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }})) By("creating a new Argo CD application in openshift-gitops ns, targeting the new namespace") - app := &argocdv1alpha1.Application{ + app = &argocdv1alpha1.Application{ ObjectMeta: metav1.ObjectMeta{Name: "test-1-10-custom", Namespace: openshiftgitopsArgoCD.Namespace}, Spec: argocdv1alpha1.ApplicationSpec{ Source: &argocdv1alpha1.ApplicationSource{ @@ -113,9 +126,6 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }, } Expect(k8sClient.Create(ctx, app)).To(Succeed()) - defer func() { // cleanup on test exit - Expect(k8sClient.Delete(ctx, app)).To(Succeed()) - }() By("verifying that Argo CD is able to deploy to that other namespace") Eventually(app, "4m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) diff --git a/test/openshift/e2e/ginkgo/sequential/1-102_validate_handle_terminating_namespaces_test.go b/test/openshift/e2e/ginkgo/sequential/1-102_validate_handle_terminating_namespaces_test.go index 556420ae1..9418ebff4 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-102_validate_handle_terminating_namespaces_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-102_validate_handle_terminating_namespaces_test.go @@ -41,8 +41,15 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-102_validate_handle_terminating_namespaces", func() { var ( - k8sClient client.Client - ctx context.Context + k8sClient client.Client + ctx context.Context + ns *corev1.Namespace + janeNs *corev1.Namespace + johnNs *corev1.Namespace + configMapJaneNs *corev1.ConfigMap + nsCleanupFunc func() + janeNsCleanupFunc func() + johnNsCleanupFunc func() ) BeforeEach(func() { @@ -52,11 +59,31 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + + fixture.OutputDebugOnFail(ns, janeNs, johnNs) + + // Remove the ConfigMap finalizer so the namespace can be cleaned up + if configMapJaneNs != nil { + configmapFixture.Update(configMapJaneNs, func(cm *corev1.ConfigMap) { + cm.Finalizers = nil + }) + } + if johnNsCleanupFunc != nil { + johnNsCleanupFunc() + } + if janeNsCleanupFunc != nil { + janeNsCleanupFunc() + } + if nsCleanupFunc != nil { + nsCleanupFunc() + } + }) + It("ensures that if one managed-by namespace is stuck in terminating, it does not prevent other managed-by namespaces from being managed or deployed to", func() { By("creating simple namespace-scoped Argo CD instance") - ns, cleanupFunc := fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() - defer cleanupFunc() + ns, nsCleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() argoCD := &argov1beta1api.ArgoCD{ ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: ns.Name}, @@ -68,20 +95,12 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Eventually(argoCD, "5m", "5s").Should(argocdFixture.BeAvailable()) By("creating a namespace 'jane' containing a ConfigMap with a unowned finalizer") - janeNs, cleanupFunc := fixture.CreateManagedNamespaceWithCleanupFunc("jane", ns.Name) - defer cleanupFunc() + janeNs, janeNsCleanupFunc = fixture.CreateManagedNamespaceWithCleanupFunc("jane", ns.Name) - configMapJaneNs := corev1.ConfigMap{ + configMapJaneNs = &corev1.ConfigMap{ ObjectMeta: metav1.ObjectMeta{Name: "my-config-map-2", Namespace: janeNs.Name, Finalizers: []string{"some.random/finalizer"}}, } - Expect(k8sClient.Create(ctx, &configMapJaneNs)).To(Succeed()) - - // At the end of the test, ensure the ConfigMap finalizer is removed so that the namespace is cleaned up - defer func() { - configmapFixture.Update(&configMapJaneNs, func(cm *corev1.ConfigMap) { - cm.Finalizers = nil - }) - }() + Expect(k8sClient.Create(ctx, configMapJaneNs)).To(Succeed()) By("deleting the jane NS in a background go routine, which puts the jane NS into a simulated stuck in terminating state") go func() { @@ -93,8 +112,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Eventually(janeNs).Should(namespaceFixture.HavePhase(corev1.NamespaceTerminating)) By("creating John NS") - johnNs, cleanupFunc := fixture.CreateManagedNamespaceWithCleanupFunc("john", ns.Name) - defer cleanupFunc() + johnNs, johnNsCleanupFunc = fixture.CreateManagedNamespaceWithCleanupFunc("john", ns.Name) By("Wait for managed-by rolebindings to be created in John NS") Eventually(func() bool { From e3d968db4aa4cc83c77929f1286742182ef574b6 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Wed, 4 Feb 2026 16:44:22 -0500 Subject: [PATCH 4/6] chore: add debug on fail outputs to additional tests Signed-off-by: Jonathan West --- .../1-025-validate-managed-by-change_test.go | 50 +++++++++++++------ .../1-116_annotation-based-tracking_test.go | 42 ++++++++++++---- .../1-006_validate_machine_config_test.go | 37 ++++++++------ .../1-027_validate_operand_from_git_test.go | 38 ++++++++------ 4 files changed, 112 insertions(+), 55 deletions(-) diff --git a/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go b/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go index 832ecd39a..2a5bc4bcc 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go @@ -42,8 +42,14 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { Context("1-025-validate-managed-by-change", func() { var ( - ctx context.Context - k8sClient client.Client + ctx context.Context + k8sClient client.Client + test_1_25_argo1 *corev1.Namespace + test_1_25_argo2 *corev1.Namespace + test_1_25_target *corev1.Namespace + cleanup1 func() + cleanup2 func() + cleanup3 func() ) BeforeEach(func() { @@ -52,27 +58,39 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + + fixture.OutputDebugOnFail("test-1-25-argo1", "test-1-25-argo2", "test-1-25-target") + + if cleanup3 != nil { + cleanup3() + } + if cleanup2 != nil { + cleanup2() + } + if cleanup1 != nil { + cleanup1() + } + }) + It("ensuring that managed-by label can transition between two different Argo CD instances", func() { By("creating 3 namespaces: 2 contain argo cd instances, and one will be managed by one of those namespaces") - test_1_25_argo1NS, cleanup1 := fixture.CreateNamespaceWithCleanupFunc("test-1-25-argo1") - defer cleanup1() + test_1_25_argo1, cleanup1 = fixture.CreateNamespaceWithCleanupFunc("test-1-25-argo1") - test_1_25_argo2NS, cleanup2 := fixture.CreateNamespaceWithCleanupFunc("test-1-25-argo2") - defer cleanup2() + test_1_25_argo2, cleanup2 = fixture.CreateNamespaceWithCleanupFunc("test-1-25-argo2") - test_1_25_targetNS, cleanup3 := fixture.CreateManagedNamespaceWithCleanupFunc("test-1-25-target", test_1_25_argo1NS.Name) - defer cleanup3() + test_1_25_target, cleanup3 = fixture.CreateManagedNamespaceWithCleanupFunc("test-1-25-target", test_1_25_argo1.Name) argoCDtest_1_25_argo1 := &argov1beta1api.ArgoCD{ - ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: test_1_25_argo1NS.Name}, + ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: test_1_25_argo1.Name}, Spec: argov1beta1api.ArgoCDSpec{}, } Expect(k8sClient.Create(ctx, argoCDtest_1_25_argo1)).To(Succeed()) argoCDtest_1_25_argo2 := &argov1beta1api.ArgoCD{ - ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: test_1_25_argo2NS.Name}, + ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: test_1_25_argo2.Name}, Spec: argov1beta1api.ArgoCDSpec{}, } Expect(k8sClient.Create(ctx, argoCDtest_1_25_argo2)).To(Succeed()) @@ -91,7 +109,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { TargetRevision: "HEAD", }, Destination: argocdv1alpha1.ApplicationDestination{ - Namespace: test_1_25_targetNS.Name, + Namespace: test_1_25_target.Name, Server: "https://kubernetes.default.svc", }, Project: "default", @@ -104,20 +122,20 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { Expect(k8sClient.Create(ctx, app)).To(Succeed()) By("waiting for all pods to be ready in both Argo CD namespaces") - fixture.WaitForAllPodsInTheNamespaceToBeReady(test_1_25_argo1NS.Name, k8sClient) - fixture.WaitForAllPodsInTheNamespaceToBeReady(test_1_25_argo2NS.Name, k8sClient) + fixture.WaitForAllPodsInTheNamespaceToBeReady(test_1_25_argo1.Name, k8sClient) + fixture.WaitForAllPodsInTheNamespaceToBeReady(test_1_25_argo2.Name, k8sClient) By("verifying Argo CD Application deployed as expected and is healthy and synced") Eventually(app, "3m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) Eventually(app, "60s", "5s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeSynced)) By("update 'test_1_25_target' NS to be managed by the second Argo CD instance, rather than the first") - namespaceFixture.Update(test_1_25_targetNS, func(n *corev1.Namespace) { + namespaceFixture.Update(test_1_25_target, func(n *corev1.Namespace) { n.Labels["argocd.argoproj.io/managed-by"] = "test-1-25-argo2" }) By("verifying that RoleBinding in 'test_1_25_target' is updated to the second namespace") - roleBindingIntest_1_25_targetNS := &rbacv1.RoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "argocd-argocd-application-controller", Namespace: test_1_25_targetNS.Name}} + roleBindingIntest_1_25_targetNS := &rbacv1.RoleBinding{ObjectMeta: metav1.ObjectMeta{Name: "argocd-argocd-application-controller", Namespace: test_1_25_target.Name}} Eventually(roleBindingIntest_1_25_targetNS).Should(rolebindingFixture.HaveSubject(rbacv1.Subject{ Kind: "ServiceAccount", Name: "argocd-argocd-application-controller", @@ -142,7 +160,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { TargetRevision: "HEAD", }, Destination: argocdv1alpha1.ApplicationDestination{ - Namespace: test_1_25_targetNS.Name, + Namespace: test_1_25_target.Name, Server: "https://kubernetes.default.svc", }, Project: "default", diff --git a/test/openshift/e2e/ginkgo/parallel/1-116_annotation-based-tracking_test.go b/test/openshift/e2e/ginkgo/parallel/1-116_annotation-based-tracking_test.go index 4a3ef1ba3..6f0352ef5 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-116_annotation-based-tracking_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-116_annotation-based-tracking_test.go @@ -41,8 +41,16 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { Context("1-116_annotation-based-tracking_test", func() { var ( - k8sClient client.Client - ctx context.Context + k8sClient client.Client + ctx context.Context + nsTestDemo1 *corev1.Namespace + nsTestDemo2 *corev1.Namespace + nsAppNS1 *corev1.Namespace + nsAppNS2 *corev1.Namespace + cleanupTestDemo1 func() + cleanupTestDemo2 func() + cleanupAppNS1 func() + cleanupAppNS2 func() ) BeforeEach(func() { @@ -53,16 +61,32 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { }) + AfterEach(func() { + + fixture.OutputDebugOnFail(nsTestDemo1, nsTestDemo2, nsAppNS1, nsAppNS2) + + if cleanupAppNS2 != nil { + cleanupAppNS2() + } + if cleanupAppNS1 != nil { + cleanupAppNS1() + } + if cleanupTestDemo2 != nil { + cleanupTestDemo2() + } + if cleanupTestDemo1 != nil { + cleanupTestDemo1() + } + }) + It("verifies that when annotation tracking is enabled that Argo CD instance starts and has the annotation tracking value specified in ConfigMap", func() { By("creating Argo CD instances with annotation+label in two different namespaces") - nsTestDemo1, cleanupFunc := fixture.CreateNamespaceWithCleanupFunc("argocd-test-demo-1") - defer cleanupFunc() + nsTestDemo1, cleanupTestDemo1 = fixture.CreateNamespaceWithCleanupFunc("argocd-test-demo-1") Eventually(nsTestDemo1).Should(namespaceFixture.HavePhase(corev1.NamespaceActive)) - nsTestDemo2, cleanupFunc := fixture.CreateNamespaceWithCleanupFunc("argocd-test-demo-2") + nsTestDemo2, cleanupTestDemo2 = fixture.CreateNamespaceWithCleanupFunc("argocd-test-demo-2") Eventually(nsTestDemo2).Should(namespaceFixture.HavePhase(corev1.NamespaceActive)) - defer cleanupFunc() argoCDTestDemo1 := &argov1beta1api.ArgoCD{ ObjectMeta: metav1.ObjectMeta{Name: "argocd-instance-demo-1", Namespace: nsTestDemo1.Name}, @@ -87,12 +111,10 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { By("creating 2 more namespaces, each managed by one of the above Argo CD instances") - nsAppNS1, cleanupFunc := fixture.CreateManagedNamespaceWithCleanupFunc("app-ns-1", "argocd-test-demo-1") - defer cleanupFunc() + nsAppNS1, cleanupAppNS1 = fixture.CreateManagedNamespaceWithCleanupFunc("app-ns-1", "argocd-test-demo-1") Eventually(nsAppNS1).Should(namespaceFixture.HavePhase(corev1.NamespaceActive)) - nsAppNS2, cleanupFunc := fixture.CreateManagedNamespaceWithCleanupFunc("app-ns-2", "argocd-test-demo-2") - defer cleanupFunc() + nsAppNS2, cleanupAppNS2 = fixture.CreateManagedNamespaceWithCleanupFunc("app-ns-2", "argocd-test-demo-2") Eventually(nsAppNS2).Should(namespaceFixture.HavePhase(corev1.NamespaceActive)) By("creating an Application in each Argo CD instance, targeting one of the namespaces and verifying the deploy succeeds") diff --git a/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go b/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go index 4166458e0..8aee46b05 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go @@ -43,8 +43,10 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-006_validate_machine_config", func() { var ( - ctx context.Context - k8sClient client.Client + ctx context.Context + k8sClient client.Client + defaultArgoCD *argov1beta1api.ArgoCD + app *argocdv1alpha1.Application ) BeforeEach(func() { @@ -53,10 +55,27 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + + if defaultArgoCD != nil { + + fixture.OutputDebugOnFail(defaultArgoCD) + + argocdFixture.Update(defaultArgoCD, func(ac *argov1beta1api.ArgoCD) { + ac.Spec.Repo.Replicas = nil + }) + } + + if app != nil { + Expect(k8sClient.Delete(ctx, app)).To(Succeed()) + } + }) + It("verifies that repo server replicas can be modified via .spec.repo.replicas", func() { By("setting the repo server replicas to 2 on openshift-gitops Argo CD") - defaultArgoCD, err := argocdFixture.GetOpenShiftGitOpsNSArgoCD() + var err error + defaultArgoCD, err = argocdFixture.GetOpenShiftGitOpsNSArgoCD() Expect(err).ToNot(HaveOccurred()) Expect(defaultArgoCD).ToNot(BeNil()) @@ -64,15 +83,8 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ac.Spec.Repo.Replicas = ptr.To(int32(2)) }) - defer func() { - // Revert to default on test end - argocdFixture.Update(defaultArgoCD, func(ac *argov1beta1api.ArgoCD) { - ac.Spec.Repo.Replicas = nil - }) - }() - By("creating an Argo CD Application targeting the Argo CD namespace") - app := &argocdv1alpha1.Application{ + app = &argocdv1alpha1.Application{ ObjectMeta: metav1.ObjectMeta{Name: "validate-machine-config", Namespace: defaultArgoCD.Namespace}, Spec: argocdv1alpha1.ApplicationSpec{ Source: &argocdv1alpha1.ApplicationSource{ @@ -94,9 +106,6 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }, } Expect(k8sClient.Create(ctx, app)).To(Succeed()) - defer func() { // Ensure Application is removed on test end - Expect(k8sClient.Delete(ctx, app)).To(Succeed()) - }() By("waiting for Argo CD to become available after the repo server change we made") Eventually(defaultArgoCD, "5m", "5s").Should(argocdFixture.BeAvailable()) diff --git a/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go b/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go index 2e808ef33..47014eb07 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-027_validate_operand_from_git_test.go @@ -44,8 +44,10 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-027_validate_operand_from_git", func() { var ( - ctx context.Context - k8sClient client.Client + ctx context.Context + k8sClient client.Client + app *argocdv1alpha1.Application + test_1_27_custom *corev1.Namespace ) BeforeEach(func() { @@ -54,6 +56,18 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + + fixture.OutputDebugOnFail(test_1_27_custom, "openshift-gitops") + + if app != nil { + Expect(k8sClient.Delete(ctx, app)).To(Succeed()) + } + if test_1_27_custom != nil { + Expect(k8sClient.Delete(ctx, test_1_27_custom)).To(Succeed()) + } + }) + It("verifies that a custom Argo CD instance can be deployed by the 'openshift-gitops' Argo CD instance. It also verfies that the custom Argo CD instance is able to deploy a simple application", func() { openshiftgitopsArgoCD, err := argocdFixture.GetOpenShiftGitOpsNSArgoCD() @@ -63,7 +77,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Eventually(openshiftgitopsArgoCD, "5m", "5s").Should(argocdFixture.BeAvailable()) By("creating Argo CD Application in openshift-gitops namespace") - app := &argocdv1alpha1.Application{ + app = &argocdv1alpha1.Application{ ObjectMeta: metav1.ObjectMeta{Name: "1-27-argocd", Namespace: openshiftgitopsArgoCD.Namespace}, Spec: argocdv1alpha1.ApplicationSpec{ Source: &argocdv1alpha1.ApplicationSource{ @@ -86,20 +100,14 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }, } Expect(k8sClient.Create(ctx, app)).To(Succeed()) - defer func() { // cleanup on test exit - Expect(k8sClient.Delete(ctx, app)).To(Succeed()) - }() By("verifying test-1-27-custom NS is created and is managed by openshift-gitops, and Application deploys successfully") - test_1_27_customNS := &corev1.Namespace{ + test_1_27_custom = &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{Name: "test-1-27-custom"}, } - Eventually(test_1_27_customNS, "5m", "5s").Should(k8sFixture.ExistByName()) - Eventually(test_1_27_customNS).Should(namespaceFixture.HaveLabel("argocd.argoproj.io/managed-by", "openshift-gitops")) - defer func() { - Expect(k8sClient.Delete(ctx, test_1_27_customNS)).To(Succeed()) // post-test cleanup - }() + Eventually(test_1_27_custom, "5m", "5s").Should(k8sFixture.ExistByName()) + Eventually(test_1_27_custom).Should(namespaceFixture.HaveLabel("argocd.argoproj.io/managed-by", "openshift-gitops")) Eventually(app, "4m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) Eventually(app, "4m", "5s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeSynced)) @@ -123,7 +131,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { TargetRevision: "HEAD", }, Destination: argocdv1alpha1.ApplicationDestination{ - Namespace: test_1_27_customNS.Name, + Namespace: test_1_27_custom.Name, Server: "https://kubernetes.default.svc", }, Project: "default", @@ -140,13 +148,13 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { By("verifying expected Argo CD workloads exist in test-1-27-custom namespace") deploymentsShouldExist := []string{"argocd-redis", "argocd-server", "argocd-repo-server", "nginx-deployment"} for _, depl := range deploymentsShouldExist { - depl := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: depl, Namespace: test_1_27_customNS.Name}} + depl := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{Name: depl, Namespace: test_1_27_custom.Name}} Eventually(depl, "4m", "5s").Should(k8sFixture.ExistByName()) Eventually(depl, "4m", "5s").Should(deploymentFixture.HaveReplicas(1)) Eventually(depl, "4m", "5s").Should(deploymentFixture.HaveReadyReplicas(1)) } - statefulSet := &appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{Name: "argocd-application-controller", Namespace: test_1_27_customNS.Name}} + statefulSet := &appsv1.StatefulSet{ObjectMeta: metav1.ObjectMeta{Name: "argocd-application-controller", Namespace: test_1_27_custom.Name}} Eventually(statefulSet).Should(k8sFixture.ExistByName()) Eventually(statefulSet).Should(statefulsetFixture.HaveReplicas(1)) Eventually(statefulSet).Should(statefulsetFixture.HaveReadyReplicas(1)) From f7576d633e053616953888a9bcb565f13d020cb9 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Wed, 4 Feb 2026 21:29:56 -0500 Subject: [PATCH 5/6] chore: add logging of applications to debug hook Signed-off-by: Jonathan West --- test/openshift/e2e/ginkgo/fixture/fixture.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/openshift/e2e/ginkgo/fixture/fixture.go b/test/openshift/e2e/ginkgo/fixture/fixture.go index 11ecf7329..f5ca03d62 100644 --- a/test/openshift/e2e/ginkgo/fixture/fixture.go +++ b/test/openshift/e2e/ginkgo/fixture/fixture.go @@ -932,6 +932,17 @@ func OutputDebugOnFail(namespaceParams ...any) { GinkgoWriter.Println("----------------------------------------------------------------") } + kubectlOutput, err = osFixture.ExecCommandWithOutputParam(false, true, "kubectl", "get", "applications", "-A", "-o", "yaml") + if err != nil { + GinkgoWriter.Println("unable to output all argo cd statuses", err, kubectlOutput) + } else { + GinkgoWriter.Println("") + GinkgoWriter.Println("----------------------------------------------------------------") + GinkgoWriter.Println("'kubectl get argocds -A -o yaml':") + GinkgoWriter.Println(kubectlOutput) + GinkgoWriter.Println("----------------------------------------------------------------") + } + GinkgoWriter.Println("You can skip this debug output by setting 'SKIP_DEBUG_OUTPUT=true'") } From 4f1d5f5656393be2a1693df4fe0e1f995fbbee27 Mon Sep 17 00:00:00 2001 From: Jonathan West Date: Fri, 6 Feb 2026 19:46:29 -0500 Subject: [PATCH 6/6] chore: add additional debug hooks to tests Signed-off-by: Jonathan West --- Makefile | 4 +- .../e2e/ginkgo/fixture/argocd/fixture.go | 6 ++- test/openshift/e2e/ginkgo/fixture/fixture.go | 52 ++++++++++++++++--- .../1-025-validate-managed-by-change_test.go | 8 +-- ...034_validate_webhook_notifications_test.go | 4 +- .../1-006_validate_machine_config_test.go | 4 +- .../1-064_validate_tcp_reset_error_test.go | 28 ++++++---- ...ate_imagepullpolicy_console_plugin_test.go | 2 +- .../1-120_validate_running_must_gather.go | 7 +-- 9 files changed, 84 insertions(+), 31 deletions(-) rename test/openshift/e2e/ginkgo/{parallel => sequential}/1-120_validate_running_must_gather.go (95%) diff --git a/Makefile b/Makefile index f9b9bc914..7d30299e5 100644 --- a/Makefile +++ b/Makefile @@ -174,7 +174,7 @@ e2e-tests-sequential-ginkgo: ginkgo ## Runs kuttl e2e sequential tests .PHONY: e2e-tests-parallel-ginkgo ## Runs kuttl e2e parallel tests, (Defaults to 5 runs at a time) e2e-tests-parallel-ginkgo: ginkgo @echo "Running GitOps Operator parallel Ginkgo E2E tests..." - $(GINKGO_CLI) -p -v -procs=5 --trace --timeout 30m -r ./test/openshift/e2e/ginkgo/parallel + $(GINKGO_CLI) -p -v -procs=5 --trace --timeout 60m -r ./test/openshift/e2e/ginkgo/parallel .PHONY: e2e-tests-sequential e2e-tests-sequential: @@ -285,7 +285,7 @@ kustomize: ## Download kustomize locally if necessary. GINKGO_CLI = $(shell pwd)/bin/ginkgo .PHONY: ginkgo ginkgo: ## Download ginkgo locally if necessary. - $(call go-get-tool,$(GINKGO_CLI),github.com/onsi/ginkgo/v2/ginkgo@v2.22.2) + $(call go-get-tool,$(GINKGO_CLI),github.com/onsi/ginkgo/v2/ginkgo@v2.25.3) # go-get-tool will 'go install' any package $2 and install it to $1. diff --git a/test/openshift/e2e/ginkgo/fixture/argocd/fixture.go b/test/openshift/e2e/ginkgo/fixture/argocd/fixture.go index a5be68e9c..b0604d6d5 100644 --- a/test/openshift/e2e/ginkgo/fixture/argocd/fixture.go +++ b/test/openshift/e2e/ginkgo/fixture/argocd/fixture.go @@ -261,7 +261,11 @@ func RunArgoCDCLI(args ...string) (string, error) { cmdArgs := append([]string{"argocd"}, args...) - GinkgoWriter.Println("executing command", cmdArgs) + if args[0] == "login" { + GinkgoWriter.Println("executing command: argocd login (...)") + } else { + GinkgoWriter.Println("executing command", cmdArgs) + } // #nosec G204 cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) diff --git a/test/openshift/e2e/ginkgo/fixture/fixture.go b/test/openshift/e2e/ginkgo/fixture/fixture.go index f5ca03d62..64eb2dc64 100644 --- a/test/openshift/e2e/ginkgo/fixture/fixture.go +++ b/test/openshift/e2e/ginkgo/fixture/fixture.go @@ -282,6 +282,8 @@ func CreateNamespace(name string) *corev1.Namespace { Labels: NamespaceLabels, }} + By("creating namespace '" + ns.Name + "'") + err := k8sClient.Create(context.Background(), ns) Expect(err).ToNot(HaveOccurred()) @@ -902,6 +904,9 @@ func OutputDebugOnFail(namespaceParams ...any) { continue } + // Uncomment this to output the pod logs from app controller and repo server in ns + // outputAppControllerAndRepoLogsInNamespace(namespace) + GinkgoWriter.Println("") GinkgoWriter.Println("----------------------------------------------------------------") GinkgoWriter.Println("'kubectl get deployments -n " + namespace + " -o yaml") @@ -938,7 +943,7 @@ func OutputDebugOnFail(namespaceParams ...any) { } else { GinkgoWriter.Println("") GinkgoWriter.Println("----------------------------------------------------------------") - GinkgoWriter.Println("'kubectl get argocds -A -o yaml':") + GinkgoWriter.Println("'kubectl get applications -A -o yaml':") GinkgoWriter.Println(kubectlOutput) GinkgoWriter.Println("----------------------------------------------------------------") } @@ -992,7 +997,7 @@ func outputPodLog(podSubstring string) { return } - // Look specifically for operator pod + // Look specifically for pod with name matchingPods := []corev1.Pod{} for idx := range podList.Items { pod := podList.Items[idx] @@ -1003,19 +1008,19 @@ func outputPodLog(podSubstring string) { if len(matchingPods) == 0 { // This can happen when the operator is not running on the cluster - GinkgoWriter.Println("DebugOutputOperatorLogs was called, but no pods were found.") + GinkgoWriter.Println("outputPodLog was called looking for substring '" + podSubstring + "', but no pods were found.") return } if len(matchingPods) != 1 { - GinkgoWriter.Println("unexpected number of operator pods", matchingPods) + GinkgoWriter.Println("unexpected number of pods", matchingPods) return } // Extract operator logs kubectlLogOutput, err := osFixture.ExecCommandWithOutputParam(false, true, "kubectl", "logs", "pod/"+matchingPods[0].Name, "manager", "-n", matchingPods[0].Namespace) if err != nil { - GinkgoWriter.Println("unable to extract operator logs", err) + GinkgoWriter.Println("unable to extract logs for", matchingPods[0].Name, err) return } @@ -1026,7 +1031,7 @@ func outputPodLog(podSubstring string) { GinkgoWriter.Println("") GinkgoWriter.Println("----------------------------------------------------------------") - GinkgoWriter.Println("Log output from operator pod:") + GinkgoWriter.Println("Log output from pod '" + matchingPods[0].Name + "' in " + matchingPods[0].Namespace + ":") for _, line := range lines[startIndex:] { GinkgoWriter.Println(">", line) } @@ -1034,6 +1039,41 @@ func outputPodLog(podSubstring string) { } +//nolint:unused +func outputAppControllerAndRepoLogsInNamespace(namespace string) { + + var podList corev1.PodList + k8sClient, _ := utils.GetE2ETestKubeClient() + err := k8sClient.List(context.Background(), &podList, client.InNamespace(namespace)) + Expect(err).ToNot(HaveOccurred()) + for _, pod := range podList.Items { + + want := strings.Contains(pod.Name, "repo-server") || strings.Contains(pod.Name, "application-controller") + if !want { + continue + } + + kubectlLogOutput, err := osFixture.ExecCommandWithOutputParam(false, true, "kubectl", "logs", "pod/"+pod.Name, "-n", pod.Namespace) + if err != nil { + GinkgoWriter.Println("unable to extract logs for", pod.Name, err) + return + } + + // Output only the last 500 lines + lines := strings.Split(kubectlLogOutput, "\n") + + startIndex := max(len(lines)-500, 0) + + GinkgoWriter.Println("") + GinkgoWriter.Println("----------------------------------------------------------------") + GinkgoWriter.Println("Log output from pod '" + pod.Name + "' in " + pod.Namespace + ":") + for _, line := range lines[startIndex:] { + GinkgoWriter.Println(">", line) + } + GinkgoWriter.Println("----------------------------------------------------------------") + } +} + func IsUpstreamOperatorTests() bool { return false // This function should return true if running from argocd-operator repo, false if running from gitops-operator repo. This is to distinguish between tests in upstream argocd-operator and downstream gitops-operator repos. } diff --git a/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go b/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go index 2a5bc4bcc..660ca3a49 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-025-validate-managed-by-change_test.go @@ -173,12 +173,12 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { Expect(k8sClient.Create(ctx, app_argo2)).To(Succeed()) By("First Argo CD instance Application should be unhealthy, because it is no longer managing the namespace") - Eventually(app, "4m", "1s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusMissing)) - Eventually(app, "4m", "1s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeUnknown)) + Eventually(app, "4m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusMissing)) + Eventually(app, "4m", "5s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeUnknown)) By("Second Argo CD instance Application should be healthy, because it is now managing the namespace") - Eventually(app_argo2, "60s", "1s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) - Eventually(app_argo2, "60s", "1s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeSynced)) + Eventually(app_argo2, "4m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) + Eventually(app_argo2, "4m", "5s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeSynced)) }) }) diff --git a/test/openshift/e2e/ginkgo/parallel/1-034_validate_webhook_notifications_test.go b/test/openshift/e2e/ginkgo/parallel/1-034_validate_webhook_notifications_test.go index 0a49f1d99..1772b66d9 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-034_validate_webhook_notifications_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-034_validate_webhook_notifications_test.go @@ -380,7 +380,7 @@ UVwpFuaKz5vTCD36Gmmy/u8y Eventually(notifConfigMap).Should(k8sFixture.ExistByName()) Eventually(notifConfigMap).Should(configmap.HaveStringDataKeyValueContainsSubstring("template.test-app-created", `{"created":"{{.app.metadata.name}}","type":"{{(call .repo.GetAppDetails).Type}}"}`)) - By("creating an Argo CD Application that contains a notificatio annotation, which will trigger the notifications controller") + By("creating an Argo CD Application that contains a notification annotation, which will trigger the notifications controller") app := &argocdv1alpha1.Application{ ObjectMeta: metav1.ObjectMeta{ Name: "my-app-3", @@ -419,7 +419,7 @@ UVwpFuaKz5vTCD36Gmmy/u8y return strings.Contains(out, `{"created":"my-app-3","type":"Directory"}`) - }).Should(BeTrue()) + }, "4m", "5s").Should(BeTrue()) }) diff --git a/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go b/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go index 8aee46b05..fa259ee9b 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-006_validate_machine_config_test.go @@ -57,9 +57,9 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { AfterEach(func() { - if defaultArgoCD != nil { + fixture.OutputDebugOnFail("openshift-gitops") - fixture.OutputDebugOnFail(defaultArgoCD) + if defaultArgoCD != nil { argocdFixture.Update(defaultArgoCD, func(ac *argov1beta1api.ArgoCD) { ac.Spec.Repo.Replicas = nil diff --git a/test/openshift/e2e/ginkgo/sequential/1-064_validate_tcp_reset_error_test.go b/test/openshift/e2e/ginkgo/sequential/1-064_validate_tcp_reset_error_test.go index ef1c6f8b4..22bed3f0d 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-064_validate_tcp_reset_error_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-064_validate_tcp_reset_error_test.go @@ -42,8 +42,10 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-064_validate_tcp_reset_error_test", func() { var ( - ctx context.Context - k8sClient client.Client + ctx context.Context + k8sClient client.Client + app *argocdv1alpha1.Application + test_1_27_customNS *corev1.Namespace ) BeforeEach(func() { @@ -52,6 +54,18 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { ctx = context.Background() }) + AfterEach(func() { + + fixture.OutputDebugOnFail("openshift-gitops", "test-1-27-custom") + + if app != nil { + Expect(k8sClient.Delete(ctx, app)).To(Succeed()) + } + if test_1_27_customNS != nil { + Expect(k8sClient.Delete(ctx, test_1_27_customNS)).To(Succeed()) + } + }) + It("verifies that argocd cli app manifests command will succesfully retrieve app manifests, and tcp reset error will not occur", func() { // This test is VERY similar to 1-027. @@ -63,7 +77,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Eventually(openshiftgitopsArgoCD, "5m", "5s").Should(argocdFixture.BeAvailable()) By("creating Argo CD Application in openshift-gitops namespace") - app := &argocdv1alpha1.Application{ + app = &argocdv1alpha1.Application{ ObjectMeta: metav1.ObjectMeta{Name: "1-27-argocd", Namespace: openshiftgitopsArgoCD.Namespace}, Spec: argocdv1alpha1.ApplicationSpec{ Source: &argocdv1alpha1.ApplicationSource{ @@ -86,20 +100,14 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { }, } Expect(k8sClient.Create(ctx, app)).To(Succeed()) - defer func() { // cleanup on test exit - Expect(k8sClient.Delete(ctx, app)).To(Succeed()) - }() By("verifying test-1-27-custom NS is created and is managed by openshift-gitops, and Application deploys successfully") - test_1_27_customNS := &corev1.Namespace{ + test_1_27_customNS = &corev1.Namespace{ ObjectMeta: metav1.ObjectMeta{Name: "test-1-27-custom"}, } Eventually(test_1_27_customNS, "5m", "5s").Should(k8sFixture.ExistByName()) Eventually(test_1_27_customNS).Should(namespaceFixture.HaveLabel("argocd.argoproj.io/managed-by", "openshift-gitops")) - defer func() { - Expect(k8sClient.Delete(ctx, test_1_27_customNS)).To(Succeed()) // post-test cleanup - }() Eventually(app, "4m", "5s").Should(appFixture.HaveHealthStatusCode(health.HealthStatusHealthy)) Eventually(app, "4m", "5s").Should(appFixture.HaveSyncStatusCode(argocdv1alpha1.SyncStatusCodeSynced)) diff --git a/test/openshift/e2e/ginkgo/sequential/1-115_validate_imagepullpolicy_console_plugin_test.go b/test/openshift/e2e/ginkgo/sequential/1-115_validate_imagepullpolicy_console_plugin_test.go index 0c8d30473..a2dabf605 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-115_validate_imagepullpolicy_console_plugin_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-115_validate_imagepullpolicy_console_plugin_test.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -var _ = Describe("GitOps Operator Parallel E2E Tests", func() { +var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-115-validate_imagepullpolicy_gitopsservice", func() { diff --git a/test/openshift/e2e/ginkgo/parallel/1-120_validate_running_must_gather.go b/test/openshift/e2e/ginkgo/sequential/1-120_validate_running_must_gather.go similarity index 95% rename from test/openshift/e2e/ginkgo/parallel/1-120_validate_running_must_gather.go rename to test/openshift/e2e/ginkgo/sequential/1-120_validate_running_must_gather.go index edca41144..81b66ad2c 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-120_validate_running_must_gather.go +++ b/test/openshift/e2e/ginkgo/sequential/1-120_validate_running_must_gather.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package parallel +package sequential import ( "context" @@ -46,7 +46,7 @@ import ( // - quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/gitops-must-gather:latest # For main branch. const defaultMustGatherImage = "quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/gitops-must-gather:latest" -var _ = Describe("GitOps Operator Parallel E2E Tests", func() { +var _ = Describe("GitOps Operator Sequential E2E Tests", func() { Context("1-120_validate_running_must_gather", func() { @@ -56,7 +56,8 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { ) BeforeEach(func() { - fixture.EnsureParallelCleanSlate() + // This test needs to be in sequential, because must-gather will attempt to retrieve the contents of openshift-gitops namespace, and thus we need other tests not to be touching that namespace at the same time. + fixture.EnsureSequentialCleanSlate() k8sClient, _ = fixtureUtils.GetE2ETestKubeClient() ctx = context.Background() })