Skip to content

Commit b50fa19

Browse files
committed
adding the right namespace
Signed-off-by: varshab1210 <[email protected]>
1 parent 0edf380 commit b50fa19

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test/openshift/e2e/sequential/1-034_validate_custom_roles/02-patch-subscription.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ apiVersion: kuttl.dev/v1beta1
33
kind: TestStep
44
commands:
55
- script: |
6-
if ! [ -z $NON_OLM ]; then
6+
if ! [ -z $NON_OLM ]; then
7+
78
oc patch deployment gitops-operator-controller-manager -n gitops-operator-system \
89
-p '{"spec":{"template":{"spec":{"containers":[{"name":"manager","env":[{"name":"CONTROLLER_CLUSTER_ROLE","value":"custom-argocd-role"},{"name":"SERVER_CLUSTER_ROLE", "value":"custom-argocd-role"}]}]}}}}'
910
1011
elif ! [ -z $CI ]; then
11-
oc patch subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'`\
12+
13+
oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'`\
1214
--type merge --patch '{"spec": {"config": {"env": [{"name": "CONTROLLER_CLUSTER_ROLE", "value": "custom-argocd-role"},{"name": "SERVER_CLUSTER_ROLE", "value": "custom-argocd-role"}]}}}'
1315
1416
else
1517
16-
oc patch -n openshift-gitops-operator subscription openshift-gitops-operator \
18+
oc patch -n openshift-operators subscription openshift-gitops-operator \
1719
--type merge --patch '{"spec": {"config": {"env": [{"name": "CONTROLLER_CLUSTER_ROLE", "value": "custom-argocd-role"},{"name": "SERVER_CLUSTER_ROLE", "value": "custom-argocd-role"}]}}}'
1820
1921
fi

test/openshift/e2e/sequential/1-034_validate_custom_roles/06-revert-patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ commands:
77
-p '{"spec":{"template":{"spec":{"containers":[{"name":"manager","env":[{"name":"CONTROLLER_CLUSTER_ROLE","value":null},{"name":"SERVER_CLUSTER_ROLE", "value":null}]}]}}}}'
88
99
elif ! [ -z $CI ]; then
10-
oc patch subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` --type json --patch='[ { "op": "remove", "path": "/spec/config" } ]'
10+
oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` --type json --patch='[ { "op": "remove", "path": "/spec/config" } ]'
1111
else
1212
oc patch subscription/openshift-gitops-operator -n openshift-gitops-operator --type json --patch='[ { "op": "remove", "path": "/spec/config" } ]'
1313
fi

0 commit comments

Comments
 (0)