Skip to content

Commit f36e515

Browse files
authored
fix mistake in oadp automation prereq logic (#2611)
* fix mistake in logic * typo * enable setup only as admissable option * fix typo * fix wait for im deployment problem * increase wait time for im
1 parent 32dc3c6 commit f36e515

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

br-testing-automation/auto-br-oadp.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ function prereq() {
204204
error "ZENSERVICE_NAME value not set. Make sure it is either set in the parameters file or as an env variable."
205205
fi
206206
fi
207-
208-
else
209-
error "Neither Backup nor Restore options were specified."
207+
fi
208+
if [[ $BACKUP != "true" ]] && [[ $RESTORE != "true" ]] && [[ $SETUP_BACKUP != "true" ]] && [[ $SETUP_RESTORE != "true" ]]; then
209+
error "Neither Backup, Restore, or setup options were specified. Please select at least one before rerunning."
210210
fi
211211

212212
#OADP setup checks
@@ -434,19 +434,19 @@ function restore_im() {
434434
info "Restoring IM Data..."
435435
wait_for_im $SERVICES_NS
436436
if [[ $MCSP_ENABLED == "true" ]]; then
437-
wait_for_deployment $SERVICES_NS "account-iam-ui-account-deployment"
437+
wait_for_deployment $SERVICES_NS "account-iam-ui-account-deployment"
438438
fi
439439
${OC} apply -f ${BASE_DIR}/templates/restore/restore-cs-db.yaml
440440
wait_for_restore restore-cs-db-data
441441
success "IM data restored successfully."
442442
}
443443

444444
function wait_for_im() {
445-
info "Sleep for 5 minutes for IM operator to create authentication cr"
446-
sleep 300
445+
info "Sleep for 7 minutes for IM operator to create authentication cr"
446+
sleep 420
447447
local namespace=$1
448448
local name="platform-identity-provider"
449-
wait_for_deployment $name $namespace
449+
wait_for_deployment $namespace $name
450450
}
451451

452452
function restore_zen() {
@@ -856,4 +856,4 @@ function info() {
856856
msg "[INFO] ${1}"
857857
}
858858

859-
main $*
859+
main $*

0 commit comments

Comments
 (0)