Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-yb committed Jan 7, 2025
1 parent 12d201b commit 7a735b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
14 changes: 14 additions & 0 deletions migtests/scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1095,4 +1095,18 @@ verify_voyager_version() {
echo "Error: yb-voyager version mismatch. Expected: $expected_version, Got: ${actual_version:-'Unknown'}."
return 1
fi
}

run_script() {
local script_file=$1
if [ -f "${script_file}" ]; then
step "Running script: ${script_file}"
source "${script_file}"
if [ $? -ne 0 ]; then
echo "Error: Script ${script_file} returned an error. Exiting."
return 1
fi
else
echo "Script ${script_file} not found, skipping."
fi
}
10 changes: 0 additions & 10 deletions migtests/scripts/upgrade-and-run-after.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ if [ -n "${SOURCE_DB_SSL_MODE}" ]; then
export TARGET_DB_NAME="${TARGET_DB_NAME}_ssl"
fi

run_script() {
local script_file=$1
if [ -f "${script_file}" ]; then
step "Running script: ${script_file}"
source "${script_file}"
else
echo "Script ${script_file} not found, skipping."
fi
}

main() {
echo ${REPO_ROOT}

Expand Down
10 changes: 0 additions & 10 deletions migtests/scripts/upgrade-and-run-before.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ if [ -n "${SOURCE_DB_SSL_MODE}" ]; then
export TARGET_DB_NAME="${TARGET_DB_NAME}_ssl"
fi

run_script() {
local script_file=$1
if [ -f "${script_file}" ]; then
step "Running script: ${script_file}"
source "${script_file}"
else
echo "Script ${script_file} not found, skipping."
fi
}

main() {
echo ${REPO_ROOT}
echo "Deleting and recreating export-dir."
Expand Down

0 comments on commit 7a735b2

Please sign in to comment.