Skip to content

Commit a619c8d

Browse files
author
Triona Doyle
committed
test: add UI E2E tests for Argo CD Resource Tree and Pod logs
1 parent ca8a012 commit a619c8d

22 files changed

Lines changed: 280 additions & 3510 deletions

bundle/manifests/argoproj.io_argocds.yaml

Lines changed: 22 additions & 638 deletions
Large diffs are not rendered by default.

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ metadata:
190190
capabilities: Deep Insights
191191
console.openshift.io/plugins: '["gitops-plugin"]'
192192
containerImage: quay.io/redhat-developer/gitops-operator
193-
createdAt: "2026-06-16T17:25:03Z"
193+
createdAt: "2026-06-11T15:05:37Z"
194194
description: Enables teams to adopt GitOps principles for managing cluster configurations
195195
and application delivery across hybrid multi-cluster Kubernetes environments.
196196
features.operators.openshift.io/disconnected: "true"

config/crd/bases/argoproj.io_argocds.yaml

Lines changed: 22 additions & 638 deletions
Large diffs are not rendered by default.

test/openshift/e2e/ginkgo/parallel/1-043_validate_log_level_format_test.go

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -129,64 +129,5 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
129129
}).Should(BeTrue())
130130

131131
})
132-
133-
It("verifies that the deprecated spec.logformat field is honoured for applicationSet and notifications", func() {
134-
By("creating a fresh test namespace")
135-
ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc()
136-
137-
By("creating ArgoCD CR using the deprecated lowercase logformat field on applicationSet and notifications")
138-
139-
argoCD := &argov1beta1api.ArgoCD{
140-
ObjectMeta: metav1.ObjectMeta{Name: "argocd", Namespace: ns.Name},
141-
Spec: argov1beta1api.ArgoCDSpec{
142-
Server: argov1beta1api.ArgoCDServerSpec{
143-
Route: argov1beta1api.ArgoCDRouteSpec{Enabled: true},
144-
},
145-
ApplicationSet: &argov1beta1api.ArgoCDApplicationSet{
146-
//nolint:staticcheck // intentionally using deprecated field to verify backward compatibility in e2e
147-
Logformat: "json",
148-
},
149-
Notifications: argov1beta1api.ArgoCDNotifications{
150-
Enabled: true,
151-
//nolint:staticcheck // intentionally using deprecated field to verify backward compatibility in e2e
152-
Logformat: "json",
153-
},
154-
},
155-
}
156-
Expect(k8sClient.Create(ctx, argoCD)).To(Succeed())
157-
158-
By("waiting for the ArgoCD instance to become fully available")
159-
160-
Eventually(argoCD, "5m", "5s").Should(argocdFixture.BeAvailable())
161-
162-
deploymentCommandContains := func(deplName, flag, value string) bool {
163-
depl := &appsv1.Deployment{
164-
ObjectMeta: metav1.ObjectMeta{Name: deplName, Namespace: ns.Name},
165-
}
166-
if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(depl), depl); err != nil {
167-
GinkgoWriter.Println("error fetching deployment", deplName, ":", err)
168-
return false
169-
}
170-
if len(depl.Spec.Template.Spec.Containers) == 0 {
171-
GinkgoWriter.Println("deployment", deplName, "has no containers yet")
172-
return false
173-
}
174-
cmdStr := strings.Join(depl.Spec.Template.Spec.Containers[0].Command, " ")
175-
GinkgoWriter.Println(deplName, "command:", cmdStr)
176-
177-
return strings.Contains(cmdStr, flag+" "+value)
178-
}
179-
By("verifying argocd-applicationset-controller Deployment has --logformat json from deprecated field")
180-
181-
Eventually(func() bool {
182-
return deploymentCommandContains("argocd-applicationset-controller", "--logformat", "json")
183-
}, "2m", "5s").Should(BeTrue())
184-
By("verifying argocd-notifications-controller Deployment has --logformat json from deprecated field")
185-
186-
Eventually(func() bool {
187-
return deploymentCommandContains("argocd-notifications-controller", "--logformat", "json")
188-
}, "2m", "5s").Should(BeTrue())
189-
190-
})
191132
})
192133
})

test/openshift/e2e/ginkgo/parallel/1-048_validate_controller_sharding_test.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture"
2727
argocdFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/argocd"
2828
k8sFixture "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/k8s"
29-
"github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/statefulset"
3029
fixtureUtils "github.com/redhat-developer/gitops-operator/test/openshift/e2e/ginkgo/fixture/utils"
3130
appsv1 "k8s.io/api/apps/v1"
3231
corev1 "k8s.io/api/core/v1"
@@ -95,43 +94,6 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() {
9594
}
9695
Expect(match).To(BeTrue(), "StatefulSet should have expected ARGOCD_CONTROLLER_REPLICAS")
9796

98-
By("ensuring algorithm can be set")
99-
argocdFixture.Update(argoCD, func(ac *argov1beta1api.ArgoCD) {
100-
ac.Spec.Controller.Sharding = argov1beta1api.ArgoCDApplicationControllerShardSpec{
101-
Enabled: true,
102-
Replicas: 3,
103-
DistributionAlgorithm: "round-robin",
104-
}
105-
})
106-
107-
By("checking if ARGOCD_CONTROLLER_SHARDING_ALGORITHM env var is set in the app controller StatefulSet")
108-
Eventually(statefulSet).Should(k8sFixture.ExistByName())
109-
Eventually(statefulSet, "60s", "5s").Should(statefulset.HaveContainerWithEnvVar("ARGOCD_CONTROLLER_SHARDING_ALGORITHM", "round-robin", 0), "Statefulset should have expected ARGOCD_CONTROLLER_SHARDING_ALGORITHM to be round-robin")
110-
111-
By("unset algorithm and ensure that it is not set")
112-
argocdFixture.Update(argoCD, func(ac *argov1beta1api.ArgoCD) {
113-
ac.Spec.Controller.Sharding = argov1beta1api.ArgoCDApplicationControllerShardSpec{
114-
Enabled: true,
115-
Replicas: 3,
116-
}
117-
})
118-
119-
By("checking if ARGOCD_CONTROLLER_SHARDING_ALGORITHM env var is not set in app controller StatefulSet")
120-
Eventually(statefulSet).Should(k8sFixture.ExistByName())
121-
Eventually(func() bool {
122-
if err := k8sClient.Get(ctx, client.ObjectKeyFromObject(statefulSet), statefulSet); err != nil {
123-
return false
124-
}
125-
if len(statefulSet.Spec.Template.Spec.Containers) == 0 {
126-
return false
127-
}
128-
for _, env := range statefulSet.Spec.Template.Spec.Containers[0].Env {
129-
if env.Name == "ARGOCD_CONTROLLER_SHARDING_ALGORITHM" {
130-
return false
131-
}
132-
}
133-
return true
134-
}, "60s", "5s").Should(BeTrue(), "StatefulSet should have no env variable named ARGOCD_CONTROLLER_SHARDING_ALGORITHM")
13597
By("disabling sharding")
13698
argocdFixture.Update(argoCD, func(ac *argov1beta1api.ArgoCD) {
13799
ac.Spec.Controller.Sharding = argov1beta1api.ArgoCDApplicationControllerShardSpec{

0 commit comments

Comments
 (0)