File tree Expand file tree Collapse file tree 4 files changed +29
-29
lines changed
test/openshift/e2e/sequential/1-105_validate_label_selector Expand file tree Collapse file tree 4 files changed +29
-29
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,9 @@ const (
3131 DefaultConsoleVersion = "v0.1.0"
3232 // Default console plugin installation OCP version
3333 DefaultDynamicPluginStartOCPVersion = "4.15.0"
34- // Label Selector is an env variable for ArgoCD instance reconcilliation .
34+ // ArgoCDLabelSelector is an env variable used for filtering ArgoCD instances to be reconciled .
3535 ArgoCDLabelSelector = "ARGOCD_LABEL_SELECTOR"
36- // Default Label Selector is used when the Label Selector is not mentioned/ empty.
36+ // DefaultArgoCDLabelSelector is used when the ARGOCD_LABEL_SELECTOR is not specified or is empty.
3737 DefaultArgoCDLabelSelector = ""
3838)
3939
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ func main() {
185185 }
186186 // Check the label selector format eg. "foo=bar"
187187 if _ , err := labels .Parse (labelSelectorFlag ); err != nil {
188- setupLog .Info ( "error parsing the labelSelector '%s'." , labelSelectorFlag )
188+ setupLog .Error ( err , "error parsing the labelSelector '%s'." , labelSelectorFlag )
189189 os .Exit (1 )
190190 }
191191 setupLog .Info (fmt .Sprintf ("Watching label-selector \" %s\" " , labelSelectorFlag ))
Original file line number Diff line number Diff line change @@ -3,21 +3,21 @@ kind: TestStep
33commands :
44# patches the subscription to add label selector in argocd-operator
55
6- - script : |
7- oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR=foo=bar -c manager
8- - script : sleep 30
96# - script: |
10- # if ! [ -z $NON_OLM ]; then
117# oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR=foo=bar -c manager
8+ # - script: sleep 30
9+ - script : |
10+ if ! [ -z $NON_OLM ]; then
11+ oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR=foo=bar -c manager
1212
13- # elif [ -z $CI ]; then
13+ elif [ -z $CI ]; then
1414
15- # oc patch -n openshift-gitops-operator subscription openshift-gitops-operator \
16- # --type merge --patch '{"spec": {"config": {"env": [{"name": "ARGOCD_LABEL_SELECTOR", "value": "foo=bar"}]}}}'
15+ oc patch -n openshift-gitops-operator subscription openshift-gitops-operator \
16+ --type merge --patch '{"spec": {"config": {"env": [{"name": "ARGOCD_LABEL_SELECTOR", "value": "foo=bar"}]}}}'
1717
18- # else
18+ else
1919
20- # oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` \
21- # --type merge --patch '{"spec": {"config": {"env": [{"name": "ARGOCD_LABEL_SELECTOR", "value": "foo=bar"}]}}}'
22- # fi
23- # - script: sleep 120
20+ oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` \
21+ --type merge --patch '{"spec": {"config": {"env": [{"name": "ARGOCD_LABEL_SELECTOR", "value": "foo=bar"}]}}}'
22+ fi
23+ - script : sleep 120
Original file line number Diff line number Diff line change @@ -2,22 +2,22 @@ apiVersion: kuttl.dev/v1beta1
22kind : TestStep
33commands :
44# patches the subscription to remove label-selector from argocd-operator
5- - script : |
6- oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR- -c manager
7- - script : sleep 30
8-
95# - script: |
10- # if ! [ -z $NON_OLM ]; then
11-
126# oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR- -c manager
7+ # - script: sleep 30
8+
9+ - script : |
10+ if ! [ -z $NON_OLM ]; then
11+
12+ oc set env deployment openshift-gitops-operator-controller-manager -n openshift-gitops-operator ARGOCD_LABEL_SELECTOR- -c manager
1313
14- # elif [ -z $CI ]; then
14+ elif [ -z $CI ]; then
1515
16- # oc patch -n openshift-gitops-operator subscription openshift-gitops-operator \
17- # --type json --patch '[{"op": "remove", "path": "/spec/config"}]'
18- # else
16+ oc patch -n openshift-gitops-operator subscription openshift-gitops-operator \
17+ --type json --patch '[{"op": "remove", "path": "/spec/config"}]'
18+ else
1919
20- # oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` \
21- # --type json --patch '[{"op": "remove", "path": "/spec/config"}]'
22- # fi
23- # - script: sleep 120
20+ oc patch -n openshift-gitops-operator subscription `subscription=gitops-operator- && oc get subscription --all-namespaces | grep $subscription | head -1 | awk '{print $2}'` \
21+ --type json --patch '[{"op": "remove", "path": "/spec/config"}]'
22+ fi
23+ - script : sleep 120
You can’t perform that action at this time.
0 commit comments