Skip to content

Commit eb33497

Browse files
chore: update comments in test scripts (#1120)
1 parent 448cf1a commit eb33497

3 files changed

Lines changed: 42 additions & 42 deletions

File tree

hack/olm/catalog-src.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ spec:
1212
base64data: ""
1313
mediatype: ""
1414
image: quay.io/rhobs/observability-operator-catalog:latest
15-
publisher: Sunil Thaha
15+
publisher: Red Hat Observability Group
1616
sourceType: grpc
1717
grpcPodConfig:
1818
securityContextConfig: restricted

test/run-e2e-ocp.sh

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e -u -o pipefail
33

44
trap cleanup EXIT
55

6-
# NOTE: install ObO and run e2e against the installation
6+
# NOTE: install Observability Operator and run e2e against the installation
77

88
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
99
declare -r PROJECT_ROOT
@@ -30,10 +30,10 @@ cleanup() {
3030
}
3131

3232
install_obo() {
33-
header "Install ObO"
33+
header "Install Observability Operator"
3434

3535
$NO_INSTALL && {
36-
skip "installation of obo "
36+
skip "installation of Observability Operator"
3737
return 0
3838
}
3939

@@ -46,14 +46,14 @@ install_obo() {
4646
oc -n "$OPERATORS_NS" wait --for=condition=CatalogSourcesUnhealthy=False \
4747
subscription.operators.coreos.com observability-operator --timeout=60s
4848

49-
ok "ObO subscription is ready"
49+
ok "Observability Operator subscription is ready"
5050
wait_for_operators_ready "$OPERATORS_NS"
5151

5252
enable_ocp
5353
}
5454

5555
enable_ocp() {
56-
# Get ObO CSV json file
56+
# Get Observability Operator CSV json file
5757
CSV_NAME=$(oc -n "$OPERATORS_NS" get sub observability-operator -o jsonpath='{.status.installedCSV}')
5858
CSV_JSON_FILE=$(mktemp /tmp/"$CSV_NAME"XXXXXX.json)
5959
if [ -e "$CSV_JSON_FILE" ]; then
@@ -65,9 +65,9 @@ enable_ocp() {
6565
retry_count=0
6666
while [ "$retry_count" -lt "$max_retries" ]; do
6767
oc -n "$OPERATORS_NS" get csv "${CSV_NAME}" -o json > "$CSV_JSON_FILE"
68-
# Update CSV json file to enable OCP mode
69-
ARGS_JSON=$(printf '%s\n' "--openshift.enabled=true" | jq -R . | jq -s .)
70-
jq --arg container_name operator --argjson args "$ARGS_JSON" '
68+
# Update the CSV manifest to enable the OpenShift features.
69+
ARGS_JSON=$(printf '%s\n' "--openshift.enabled=true" | jq -R . | jq -s .)
70+
jq --arg container_name operator --argjson args "$ARGS_JSON" '
7171
(.spec.install.spec.deployments[].spec.template.spec.containers[] | select(.name == $container_name) | .args) += $args
7272
' "$CSV_JSON_FILE" > /tmp/tmp.$$.json && mv /tmp/tmp.$$.json "$CSV_JSON_FILE"
7373
ok "Added arguments to container operator in '$CSV_JSON_FILE'."
@@ -85,38 +85,38 @@ enable_ocp() {
8585
fi
8686
done
8787

88-
rm -f "$CSV_JSON_FILE"
88+
rm -f "$CSV_JSON_FILE"
8989

90-
# enable platform monitoring
91-
oc label ns "$OPERATORS_NS" openshift.io/cluster-monitoring=true
90+
# Enable platform monitoring.
91+
oc label ns "$OPERATORS_NS" openshift.io/cluster-monitoring=true
9292

93-
oc wait --for=condition=Established crd/uiplugins.observability.openshift.io --timeout=60s
94-
ok "Enable OCP mode successfully"
93+
oc wait --for=condition=Established crd/uiplugins.observability.openshift.io --timeout=60s
94+
ok "Enable OCP mode successfully"
9595
}
9696

9797
delete_obo() {
98-
header "Deleting ObO subscription"
98+
header "Deleting Observability Operator subscription"
9999

100-
$NO_UNINSTALL && {
101-
skip "uninstallation of obo"
102-
return 0
103-
}
100+
$NO_UNINSTALL && {
101+
skip "uninstallation of Observability Operator"
102+
return 0
103+
}
104104

105-
oc delete -n "$OPERATORS_NS" csv \
106-
-l operators.coreos.com/observability-operator."$OPERATORS_NS"= || true
105+
oc delete -n "$OPERATORS_NS" csv \
106+
-l operators.coreos.com/observability-operator."$OPERATORS_NS"= || true
107107

108-
oc delete -n "$OPERATORS_NS" installplan,subscriptions \
109-
-l operators.coreos.com/observability-operator."$OPERATORS_NS"= || true
108+
oc delete -n "$OPERATORS_NS" installplan,subscriptions \
109+
-l operators.coreos.com/observability-operator."$OPERATORS_NS"= || true
110110

111-
oc delete -f hack/olm/subscription.yaml || true
112-
oc delete -f hack/olm/catalog-src.yaml || true
113-
oc delete crds "$(oc api-resources --api-group=monitoring.rhobs -o name)"
114-
ok "uninstalled ObO"
111+
oc delete -f hack/olm/subscription.yaml || true
112+
oc delete -f hack/olm/catalog-src.yaml || true
113+
oc delete crds "$(oc api-resources --api-group=monitoring.rhobs -o name)"
114+
ok "Observability operator uninstalled"
115115
}
116116

117117
parse_args() {
118-
### while there are args parse them
119-
while [[ -n "${1+xxx}" ]]; do
118+
### while there are args parse them
119+
while [[ -n "${1+xxx}" ]]; do
120120
case $1 in
121121
-h | --help)
122122
SHOW_USAGE=true
@@ -154,8 +154,8 @@ print_usage() {
154154
155155
Options:
156156
-h|--help show this help
157-
--no-install do not install OBO, useful for rerunning tests
158-
--no-uninstall do not uninstall OBO after test
157+
--no-install do not install Observability Operator, useful for rerunning tests
158+
--no-uninstall do not uninstall Observability Operator after test
159159
--postpone-restoration DURATION
160160
delay operator Subscription restoration after uninstall
161161
tests (e.g. 10m) to allow manual cluster inspection

test/run-e2e.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ assert_no_reconciliation_errors() {
134134
}
135135

136136
run_bundle() {
137-
header "Running ObO Bundle"
137+
header "Running Observability Operator Bundle"
138138

139139
./tmp/bin/operator-sdk run bundle "$BUNDLE_IMG" \
140140
--install-mode AllNamespaces --namespace "$OPERATORS_NS" --skip-tls \
@@ -177,7 +177,7 @@ run_e2e() {
177177
# logging of errors may not be immediate, so it is better to read logs again
178178
# than dumping the $obo_error_log file
179179
sleep 2
180-
info "ObO Error Logs"
180+
info "Observability Operator Error Logs"
181181
line 50
182182
kubectl logs -n "$OPERATORS_NS" deploy/observability-operator | grep error | tee "$obo_error_log"
183183
line 50
@@ -271,19 +271,19 @@ init_logs_dir() {
271271
}
272272

273273
restart_obo() {
274-
header "Restart ObO deployment"
274+
header "Restart Observability Operator deployment"
275275

276276
ensure_obo_deploy_img_is_always_pulled || return 1
277277

278-
info "scale down ObO"
278+
info "scale down Observability Operator"
279279
kubectl scale -n "$OPERATORS_NS" --replicas=0 deploy/observability-operator
280280
kubectl wait -n "$OPERATORS_NS" --for=delete pods -l app.kubernetes.io/component=operator --timeout=60s
281281

282-
info "scale up ObO"
282+
info "scale up Observability Operator"
283283
kubectl scale -n "$OPERATORS_NS" --replicas=1 deploy/observability-operator
284284
wait_for_operators_ready "$OPERATORS_NS"
285285

286-
ok "ObO deployment restarted"
286+
ok "Observability Operator deployment restarted"
287287

288288
}
289289

@@ -329,12 +329,12 @@ ensure_obo_imgpullpolicy_always_in_yaml() {
329329
return 1
330330
}
331331

332-
ok "ObO deployment yaml imagePullPolicy is Always"
332+
ok "Observability Operator deployment yaml imagePullPolicy is Always"
333333
}
334334

335335
ensure_obo_deploy_img_is_always_pulled() {
336336
$CI_MODE && {
337-
ok "skipping check of imagePullPolicy of ObO deployment"
337+
ok "skipping check of imagePullPolicy of Observability Operator deployment"
338338
return 0
339339
}
340340

@@ -349,7 +349,7 @@ ensure_obo_deploy_img_is_always_pulled() {
349349
warn "Deployment's imagePullPolicy must be Always instead of $pull_policy"
350350
return 1
351351
fi
352-
ok "ObO deployment imagePullPolicy is Always"
352+
ok "Observability Operator deployment imagePullPolicy is Always"
353353
}
354354

355355
reset_env() {
@@ -390,14 +390,14 @@ main() {
390390
if ! $NO_DEPLOY; then
391391
deploy_obo
392392
else
393-
restart_obo || die "restarting ObO failed 🤕"
393+
restart_obo || die "restarting Observability Operator failed 🤕"
394394
fi
395395

396396
# wait for the deletion to complete before running tests
397397
wait
398398

399399
assert_no_reconciliation_errors pre-e2e ||
400-
die "ObO has reconciliation errors before running test"
400+
die "Observability Operator has reconciliation errors before running test"
401401

402402
local -i ret=0
403403
run_e2e || ret=$?

0 commit comments

Comments
 (0)