diff --git a/test/openshift/e2e/ginkgo/fixture/gitserver/gitea.go b/test/openshift/e2e/ginkgo/fixture/gitserver/gitea.go index 1e75e88c0fb..61aa4f9d4cf 100644 --- a/test/openshift/e2e/ginkgo/fixture/gitserver/gitea.go +++ b/test/openshift/e2e/ginkgo/fixture/gitserver/gitea.go @@ -3,6 +3,7 @@ package gitserver import ( "encoding/base64" "fmt" + "runtime" "strings" . "github.com/onsi/ginkgo/v2" @@ -16,11 +17,18 @@ import ( ) const ( - // Use latest for multi-arch support + // TODO: Build s390x image (upstream lacks it). See argo-rollouts-manager pattern: + // https://github.com/argoproj-labs/argo-rollouts-manager/blob/67002e569d7f7de26a60a1f5a8d0b4924931b4da/hack/run-upstream-argo-rollouts-e2e-tests.sh#L31 giteaImage = "ghcr.io/go-gitea/gitea:latest-rootless" giteaCustomPath = "/data/gitea" ) +func init() { + if runtime.GOARCH == "s390x" { + GinkgoWriter.Printf("Gitea tests skipped on s390x (no upstream image). See TODO above.\n") + } +} + func giteaEnvVars(domain, internalToken string) []corev1.EnvVar { return []corev1.EnvVar{ {Name: "USER_UID", Value: "1000"}, diff --git a/test/openshift/e2e/ginkgo/parallel/1-031_validate_toolchain_test.go b/test/openshift/e2e/ginkgo/parallel/1-031_validate_toolchain_test.go index 06ca9c1e60b..5f1373ab9de 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-031_validate_toolchain_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-031_validate_toolchain_test.go @@ -85,22 +85,26 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { It("verifies that toolchain versions have the expected values", Label("openshift"), func() { // These variables need to be maintained according to the component matrix: https://spaces.redhat.com/display/GITOPS/GitOps+Component+Matrix + // RC4 (Final Build) component versions expected_kustomizeVersion := "v5.8.1" - expected_helmVersion := "v4.2.4" - expected_argocdVersion := "v3.5.2" + //only checking major.minor, patch version can shift independently of the argocd bump + expected_helmVersion := "v4.2" + var expected_argocdVersion string var expected_dexVersion string var expected_redisVersion string if os.Getenv("CI") == "prow" { // when running against openshift-ci + expected_argocdVersion = "v3.5.2" expected_dexVersion = "v2.45.1" - expected_redisVersion = "7.2.14" + expected_redisVersion = "8.2.3" } else { // when running against RC/ released version of gitops + expected_argocdVersion = "v3.5.4" expected_dexVersion = "v2.45.1" - expected_redisVersion = "7.2.14" + expected_redisVersion = "7.2.16" } By("locating pods containing toolchain in openshift-gitops") @@ -175,7 +179,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { By("verifying containers have expected toolchain versions") Expect(kustomizeVersion).To(Equal(expected_kustomizeVersion)) - Expect(helmVersion).To(Equal(expected_helmVersion)) + Expect(helmVersion).To(HavePrefix(expected_helmVersion)) Expect(dexVersion).To(Equal(expected_dexVersion)) // We are as argocdVersion contains v2.7.6+00c914a suffix addition to the version no. diff --git a/test/openshift/e2e/ginkgo/parallel/1-090_validate_permissions_test.go b/test/openshift/e2e/ginkgo/parallel/1-090_validate_permissions_test.go index 43143a890d9..35f86182bd5 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-090_validate_permissions_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-090_validate_permissions_test.go @@ -66,7 +66,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { apiVersion: operators.coreos.com/v1alpha1 kind: ClusterServiceVersion metadata: - name: openshift-gitops-operator.v1.16.0 + name: openshift-gitops-operator.v1.22.0 namespace: openshift-operators spec: install: @@ -74,31 +74,12 @@ spec: clusterPermissions: - rules: - apiGroups: - - "" + - '' resources: - configmaps - endpoints - events - namespaces - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - persistentvolumeclaims - pods - secrets @@ -114,44 +95,37 @@ spec: - update - watch - apiGroups: - - "" + - '' resources: - deployments + - podtemplates verbs: - get - list - watch - apiGroups: - - "" - resources: - - namespaces - - resourcequotas - verbs: - - create - - delete - - get - - list - - update - - watch - - apiGroups: - - "" + - '' resources: - pods/eviction + - serviceaccounts/token verbs: - create - apiGroups: - - "" + - '' resources: - pods/log verbs: - get - apiGroups: - - "" + - '' resources: - - podtemplates + - resourcequotas verbs: + - create + - delete - get - list + - update - watch - apiGroups: - apiextensions.k8s.io @@ -166,8 +140,13 @@ spec: resources: - apiservices verbs: + - create + - delete - get - list + - patch + - update + - watch - apiGroups: - appmesh.k8s.aws resources: @@ -192,22 +171,9 @@ spec: resources: - daemonsets - deployments - - replicasets - - statefulsets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - apps - resources: - - deployments - podtemplates - replicasets + - statefulsets verbs: - create - delete @@ -247,21 +213,16 @@ spec: resources: - analysisruns - analysisruns/finalizers + - analysistemplates + - clusteranalysistemplates - experiments - experiments/finalizers - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - - apiGroups: - - argoproj.io - resources: - - analysistemplates + - namespacemanagements + - namespacemanagements/status + - rollouts + - rollouts/finalizers + - rollouts/scale + - rollouts/status verbs: - create - delete @@ -279,6 +240,7 @@ spec: - argocds - argocds/finalizers - argocds/status + - rolloutmanagers verbs: - create - delete @@ -287,19 +249,6 @@ spec: - patch - update - watch - - apiGroups: - - argoproj.io - resources: - - clusteranalysistemplates - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - apiGroups: - argoproj.io resources: @@ -307,18 +256,6 @@ spec: - notificationsconfigurations/finalizers verbs: - '*' - - apiGroups: - - argoproj.io - resources: - - rolloutmanagers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - argoproj.io resources: @@ -333,22 +270,6 @@ spec: - get - patch - update - - apiGroups: - - argoproj.io - resources: - - rollouts - - rollouts/finalizers - - rollouts/scale - - rollouts/status - verbs: - - create - - delete - - deletecollection - - get - - list - - patch - - update - - watch - apiGroups: - autoscaling resources: @@ -374,22 +295,13 @@ spec: - patch - update - watch - - apiGroups: - - batch - resources: - - jobs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - apiGroups: - config.openshift.io resources: + - apiservers + - authentications - clusterversions + - ingresses verbs: - get - list @@ -409,6 +321,7 @@ spec: - console.openshift.io resources: - consolelinks + - consoleplugins verbs: - create - delete @@ -418,33 +331,21 @@ spec: - update - watch - apiGroups: - - console.openshift.io + - coordination.k8s.io resources: - - consoleplugins + - leases verbs: - create - - delete - get - - list - - patch - update - - watch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create - - get - - update - apiGroups: - eks.amazonaws.com - elbv2.k8s.aws resources: - - targetgroupbindings + - targetgroupbindings verbs: - - get - - list + - get + - list - apiGroups: - extensions resources: @@ -457,6 +358,7 @@ spec: - watch - apiGroups: - getambassador.io + - x.getambassador.io resources: - ambassadormappings - mappings @@ -493,18 +395,7 @@ spec: - update - watch - apiGroups: - - networking.k8s.io - resources: - - ingresses - verbs: - - create - - get - - list - - patch - - update - - watch - - apiGroups: - - networking.k8s.io + - networking.k8s.io resources: - ingresses - networkpolicies @@ -543,17 +434,6 @@ spec: - pipelines.openshift.io resources: - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - pipelines.openshift.io - resources: - gitopsservices verbs: - create @@ -578,23 +458,24 @@ spec: - patch - update - apiGroups: - - rbac.authorization.k8s.io + - promoter.argoproj.io resources: - '*' verbs: - - bind - - create - - delete - - deletecollection - - escalate - get - list - - patch - - update - - watch + - apiGroups: + - promoter.argoproj.io + resources: + - controllerconfigurations + - controllerconfigurations/finalizers + - controllerconfigurations/status + verbs: + - '*' - apiGroups: - rbac.authorization.k8s.io resources: + - '*' - clusterrolebindings - clusterroles verbs: @@ -625,17 +506,6 @@ spec: - route.openshift.io resources: - '*' - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - route.openshift.io - resources: - routes - routes/custom-host verbs: @@ -678,18 +548,10 @@ spec: - get - update - watch - - apiGroups: - - x.getambassador.io - resources: - - ambassadormappings - - mappings + - nonResourceURLs: + - /metrics verbs: - - create - - delete - get - - list - - update - - watch - apiGroups: - authentication.k8s.io resources: @@ -707,10 +569,11 @@ spec: Expect(yaml.UnmarshalStrict([]byte(csvString), expectedCsv)).To(Succeed()) - By("looking for a ClusterServiceVersion for openshift-gitops across all namespaces") + By("looking for the original ClusterServiceVersion in openshift-gitops-operator namespace") gitopsCSVsFound := []olmv1alpha1.ClusterServiceVersion{} var csvList olmv1alpha1.ClusterServiceVersionList - Expect(k8sClient.List(ctx, &csvList)).To(Succeed()) + // Only search in the OperatorGroup namespace (openshift-gitops-operator) to find the original CSV + Expect(k8sClient.List(ctx, &csvList, client.InNamespace("openshift-gitops-operator"))).To(Succeed()) for index := range csvList.Items { csv := csvList.Items[index] if strings.Contains(csv.Name, "openshift-gitops-operator") { @@ -718,7 +581,7 @@ spec: } } By("if more than one possible CSV is found, we will fail.") - Expect(gitopsCSVsFound).To(HaveLen(1), fmt.Sprintf("Exactly one CSV should found: %v", gitopsCSVsFound)) + Expect(gitopsCSVsFound).To(HaveLen(1), fmt.Sprintf("Exactly one CSV should be found in OperatorGroup namespace: %v", gitopsCSVsFound)) actualCsv := &olmv1alpha1.ClusterServiceVersion{ ObjectMeta: metav1.ObjectMeta{ diff --git a/test/openshift/e2e/ginkgo/parallel/1-095_validate_dex_clientsecret_test.go b/test/openshift/e2e/ginkgo/parallel/1-095_validate_dex_clientsecret_test.go index e7022148fd5..ed2a1682e8b 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-095_validate_dex_clientsecret_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-095_validate_dex_clientsecret_test.go @@ -192,7 +192,6 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { By("verifying the legacy Secret stays deleted") Consistently(legacySecretGone, "20s", "4s").Should(BeTrue(), "legacy kubernetes.io/service-account-token Secret must not reappear") - By("verifying the Argo CD instance stays healthy after legacy cleanup") Eventually(argoCD, "2m", "5s").Should(argocdFixture.BeAvailable()) }) diff --git a/test/openshift/e2e/ginkgo/parallel/1-121_validate_image_updater_test.go b/test/openshift/e2e/ginkgo/parallel/1-121_validate_image_updater_test.go index 4d9decdf076..16909e1a93a 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-121_validate_image_updater_test.go +++ b/test/openshift/e2e/ginkgo/parallel/1-121_validate_image_updater_test.go @@ -18,6 +18,7 @@ package parallel import ( "context" + "runtime" "strings" "github.com/argoproj/argo-cd/gitops-engine/pkg/health" @@ -83,6 +84,11 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { }) It("ensures that Image Updater will update Argo CD Application to the latest image", func() { + // TODO: Build multi-arch guestbook_go image. Upstream lacks s390x support. + // See fixture/gitserver/gitea.go for multi-arch build pattern from argo-rollouts-manager. + if runtime.GOARCH == "s390x" { + Skip("guestbook_go image lacks s390x support. See fixture/gitserver/gitea.go TODO for multi-arch build pattern.") + } By("creating simple namespace-scoped Argo CD instance with image updater enabled") ns, cleanupFunc = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() @@ -201,7 +207,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { } Expect(k8sClient.Create(ctx, imageUpdater)).To(Succeed()) - By("ensuring that the Application image has `29437546.0` version after update") + By("ensuring that the Application image has been updated to latest nginx version") Eventually(func() string { err := k8sClient.Get(ctx, client.ObjectKeyFromObject(app), app) @@ -216,7 +222,7 @@ var _ = Describe("GitOps Operator Parallel E2E Tests", func() { imageStr := string(app.Spec.Source.Kustomize.Images[0]) GinkgoWriter.Printf("Current Application image: %s\n", imageStr) if imageStr == "quay.io/devtools_gitops/guestbook_go:29437546.0" { - GinkgoWriter.Printf("SUCCESS: Image updated to 29437546.0\n") + GinkgoWriter.Printf("SUCCESS: Image updated to guestbook_go 29437546.0\n") } return imageStr } diff --git a/test/openshift/e2e/ginkgo/parallel/1-141_source_hydrator.go b/test/openshift/e2e/ginkgo/parallel/1-141_source_hydrator.go index 2942252f67e..dc07e48fc0a 100644 --- a/test/openshift/e2e/ginkgo/parallel/1-141_source_hydrator.go +++ b/test/openshift/e2e/ginkgo/parallel/1-141_source_hydrator.go @@ -3,6 +3,7 @@ package parallel import ( "context" _ "embed" + "runtime" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -305,6 +306,11 @@ patches: }) It("hydrate kustomize to another branch via ssh", Label("openshift"), func() { + // TODO: Build custom s390x Gitea image. Upstream lacks s390x support. + // See fixture/gitserver/gitea.go for multi-arch build pattern from argo-rollouts-manager. + if runtime.GOARCH == "s390x" { + Skip("Gitea (gitserver) lacks s390x image. See fixture/gitserver/gitea.go TODO for multi-arch build pattern.") + } ns, nsCleanup = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() server, cleanup := gitserverFixture.StartServer(ctx, k8sClient, ns) @@ -411,6 +417,11 @@ patches: }) It("hydrate helm to another directory via https", Label("openshift"), func() { + // TODO: Build custom s390x Gitea image. Upstream lacks s390x support. + // See fixture/gitserver/gitea.go for multi-arch build pattern from argo-rollouts-manager. + if runtime.GOARCH == "s390x" { + Skip("Gitea (gitserver) lacks s390x image. See fixture/gitserver/gitea.go TODO for multi-arch build pattern.") + } ns, nsCleanup = fixture.CreateRandomE2ETestNamespaceWithCleanupFunc() server, cleanup := gitserverFixture.StartServer(ctx, k8sClient, ns) diff --git a/test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go b/test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go index f31274c3915..080d0f554e7 100644 --- a/test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go +++ b/test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go @@ -334,7 +334,12 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { container := deploymentFixture.GetTemplateSpecContainerByName(argoCDAgentAgentName, *agentDeployment) Expect(container).ToNot(BeNil()) - Expect(container.Image).To(Equal(common.ArgoCDAgentAgentDefaultImageName)) + + if fixture.EnvCI() || fixture.EnvLocalRun() || fixture.EnvNonOLM() { + Expect(container.Image).To(Equal(common.ArgoCDAgentAgentDefaultImageName)) + } else { + Expect(container.Image).To(HavePrefix("registry.redhat.io/openshift-gitops-1/argocd-agent-rhel9")) + } By("Verify environment variables are set correctly") @@ -394,7 +399,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { argocdFixture.Update(argoCD, func(ac *argov1beta1api.ArgoCD) { ac.Spec.ArgoCDAgent.Agent.LogLevel = "trace" ac.Spec.ArgoCDAgent.Agent.LogFormat = "json" - ac.Spec.ArgoCDAgent.Agent.Image = "quay.io/argoprojlabs/argocd-agent:v0.8.1" + ac.Spec.ArgoCDAgent.Agent.Image = "quay.io/argoprojlabs/argocd-agent:v0.10.0" ac.Spec.ArgoCDAgent.Agent.Client.KeepAliveInterval = "60s" ac.Spec.ArgoCDAgent.Agent.Client.EnableWebSocket = new(true) @@ -423,7 +428,7 @@ var _ = Describe("GitOps Operator Sequential E2E Tests", func() { if container == nil { return false } - return container.Image == "quay.io/argoprojlabs/argocd-agent:v0.8.1" + return container.Image == "quay.io/argoprojlabs/argocd-agent:v0.10.0" }, "120s", "5s").Should(BeTrue(), "Agent deployment should have the updated image") By("Verify environment variables are updated correctly")