Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Enable bash debug in "run-local.sh" #414

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/e2e/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ undo_changes() {
# Do not try to undo steps that did not execute.
if [ $step_install_operator -eq 1 ]; then
echo "::info:: Uninstall the operator"
run 10m sudo -E PATH="$PATH" bash -c './operator.sh uninstall' || true
run 10m sudo -E PATH="$PATH" bash -xc './operator.sh uninstall' || true
fi

if [ $step_start_cluster -eq 1 ]; then
echo "::info:: Shutdown the cluster"
run 5m sudo -E PATH="$PATH" bash -c './cluster/down.sh' || true
run 5m sudo -E PATH="$PATH" bash -xc './cluster/down.sh' || true
fi

if [ $step_bootstrap_env -eq 1 ]; then
Expand Down Expand Up @@ -106,19 +106,19 @@ main() {

echo "::info:: Bring up the test cluster"
step_start_cluster=1
run 10m sudo -E PATH="$PATH" bash -c './cluster/up.sh'
run 10m sudo -E PATH="$PATH" bash -xc './cluster/up.sh'
export KUBECONFIG=/etc/kubernetes/admin.conf

echo "::info:: Build and install the operator"
step_install_operator=1
run 20m sudo -E PATH="$PATH" bash -c './operator.sh'
run 20m sudo -E PATH="$PATH" bash -xc './operator.sh'

echo "::info:: Run tests"
local cmd="run 20m sudo -E PATH=\"$PATH\" bash -c "
if [ -z "$runtimeclass" ]; then
cmd+="'./tests_runner.sh'"
cmd+="'bash -x ./tests_runner.sh'"
else
cmd+="'./tests_runner.sh -r $runtimeclass'"
cmd+="'bash -x ./tests_runner.sh -r $runtimeclass'"
fi
eval $cmd
popd >/dev/null
Expand Down
Loading