@red-hat-developer-hub/e2e-test-utils 1.1.25 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -105,7 +105,9 @@ log::success() {
|
|
|
105
105
|
# Operator subscription and status
|
|
106
106
|
# ---------------------------------------------------------------------------
|
|
107
107
|
install_subscription() {
|
|
108
|
-
local name=$1 namespace=$2 channel=$3 package=$4 source_name=$5 source_namespace=$6
|
|
108
|
+
local name=$1 namespace=$2 channel=$3 package=$4 source_name=$5 source_namespace=$6 starting_csv=${7:-}
|
|
109
|
+
local spec_extra=""
|
|
110
|
+
[[ -n "$starting_csv" ]] && spec_extra=" startingCSV: $starting_csv"
|
|
109
111
|
oc apply -f - << EOD
|
|
110
112
|
apiVersion: operators.coreos.com/v1alpha1
|
|
111
113
|
kind: Subscription
|
|
@@ -118,6 +120,7 @@ spec:
|
|
|
118
120
|
name: $package
|
|
119
121
|
source: $source_name
|
|
120
122
|
sourceNamespace: $source_namespace
|
|
123
|
+
${spec_extra}
|
|
121
124
|
EOD
|
|
122
125
|
return 0
|
|
123
126
|
}
|
|
@@ -136,11 +139,11 @@ check_operator_status() {
|
|
|
136
139
|
}
|
|
137
140
|
|
|
138
141
|
install_serverless_logic_ocp_operator() {
|
|
139
|
-
install_subscription logic-operator
|
|
142
|
+
install_subscription logic-operator openshift-operators stable logic-operator redhat-operators openshift-marketplace
|
|
140
143
|
return 0
|
|
141
144
|
}
|
|
142
145
|
waitfor_serverless_logic_ocp_operator() {
|
|
143
|
-
check_operator_status 500 openshift-operators "OpenShift Serverless Logic
|
|
146
|
+
check_operator_status 500 openshift-operators "Red Hat OpenShift Serverless Logic" Succeeded
|
|
144
147
|
return 0
|
|
145
148
|
}
|
|
146
149
|
|
|
@@ -454,11 +457,12 @@ main() {
|
|
|
454
457
|
log::info "OpenShift Serverless Operator already installed"
|
|
455
458
|
fi
|
|
456
459
|
|
|
457
|
-
if
|
|
460
|
+
if oc get subscription logic-operator -n openshift-operators &>/dev/null || \
|
|
461
|
+
oc get subscription logic-operator-rhel8 -n openshift-operators &>/dev/null; then
|
|
462
|
+
log::info "OpenShift Serverless Logic Operator already installed"
|
|
463
|
+
else
|
|
458
464
|
log::info "Installing OpenShift Serverless Logic Operator..."
|
|
459
465
|
install_serverless_logic_ocp_operator
|
|
460
|
-
else
|
|
461
|
-
log::info "OpenShift Serverless Logic Operator already installed"
|
|
462
466
|
fi
|
|
463
467
|
|
|
464
468
|
log::info "Waiting for operators to be ready..."
|