Skip to content

Commit e339d22

Browse files
Rizwana777jgwest
andauthored
Add e2e tests for namespaceManagement (#948)
* Add e2e tests for namespaceManagement Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> * Add namespacemanagement/status to RBAC, and tweak test contents Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> * Fix merge conflicts Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> * Add remaining namespaceManagement tests Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> * Add additional Consistently checks Signed-off-by: Jonathan West <jonwest@redhat.com> * Add a new test and address review comments Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> --------- Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> Signed-off-by: Jonathan West <jonwest@redhat.com> Co-authored-by: Jonathan West <jonwest@redhat.com>
1 parent 9e522bf commit e339d22

File tree

6 files changed

+478
-4
lines changed

6 files changed

+478
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ e2e-tests-ginkgo: e2e-tests-sequential-ginkgo e2e-tests-parallel-ginkgo ## Runs
161161
.PHONY: e2e-tests-sequential-ginkgo
162162
e2e-tests-sequential-ginkgo: ginkgo ## Runs kuttl e2e sequential tests
163163
@echo "Running GitOps Operator sequential Ginkgo E2E tests..."
164-
$(GINKGO_CLI) -v --trace --timeout 90m -r ./test/openshift/e2e/ginkgo/sequential
164+
$(GINKGO_CLI) -v --trace --timeout 120m -r ./test/openshift/e2e/ginkgo/sequential
165165

166166
.PHONY: e2e-tests-parallel-ginkgo ## Runs kuttl e2e parallel tests, (Defaults to 5 runs at a time)
167167
e2e-tests-parallel-ginkgo: ginkgo

bundle/manifests/gitops-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ metadata:
180180
capabilities: Deep Insights
181181
console.openshift.io/plugins: '["gitops-plugin"]'
182182
containerImage: quay.io/redhat-developer/gitops-operator
183-
createdAt: "2025-08-20T01:09:37Z"
183+
createdAt: "2025-08-21T01:20:45Z"
184184
description: Enables teams to adopt GitOps principles for managing cluster configurations
185185
and application delivery across hybrid multi-cluster Kubernetes environments.
186186
features.operators.openshift.io/disconnected: "true"
@@ -494,6 +494,7 @@ spec:
494494
- experiments
495495
- experiments/finalizers
496496
- namespacemanagements
497+
- namespacemanagements/status
497498
- rollouts
498499
- rollouts/finalizers
499500
- rollouts/scale

config/rbac/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ rules:
143143
- experiments
144144
- experiments/finalizers
145145
- namespacemanagements
146+
- namespacemanagements/status
146147
- rollouts
147148
- rollouts/finalizers
148149
- rollouts/scale

controllers/gitopsservice_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ type ReconcileGitopsService struct {
198198
//+kubebuilder:rbac:groups=argoproj.io,resources=notificationsconfigurations;notificationsconfigurations/finalizers,verbs=*
199199
//+kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch;
200200
//+kubebuilder:rbac:groups="apiregistration.k8s.io",resources="apiservices",verbs=get;list
201-
//+kubebuilder:rbac:groups="argoproj.io",resources=namespacemanagements,verbs=create;get;list;watch;update;patch;delete;deletecollection
201+
//+kubebuilder:rbac:groups="argoproj.io",resources=namespacemanagements;namespacemanagements/status,verbs=create;get;list;watch;update;patch;delete;deletecollection
202202

203203
// Reconcile reads that state of the cluster for a GitopsService object and makes changes based on the state read
204204
// and what is in the GitopsService.Spec

test/openshift/e2e/ginkgo/fixture/fixture.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ func RestoreSubcriptionToDefault() {
510510
Expect(err).ToNot(HaveOccurred())
511511

512512
// optionalEnvVarsToRemove is a non-exhaustive list of environment variables that are known to be added to Subscription or operator Deployment by tests
513-
optionalEnvVarsToRemove := []string{"DISABLE_DEFAULT_ARGOCD_CONSOLELINK", "CONTROLLER_CLUSTER_ROLE", "SERVER_CLUSTER_ROLE", "ARGOCD_LABEL_SELECTOR"}
513+
optionalEnvVarsToRemove := []string{"DISABLE_DEFAULT_ARGOCD_CONSOLELINK", "CONTROLLER_CLUSTER_ROLE", "SERVER_CLUSTER_ROLE", "ARGOCD_LABEL_SELECTOR", "ALLOW_NAMESPACE_MANAGEMENT_IN_NAMESPACE_SCOPED_INSTANCES"}
514514

515515
if EnvNonOLM() {
516516

0 commit comments

Comments
 (0)