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

e2e: enable vagrant debugging. #376

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions test/e2e/lib/vm.bash
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ vm-setup() {
make install || error "failed to check/install vagrant plugins"

if [ ! -d .vagrant ]; then
vagrant init --template Vagrantfile $distro || error "failed to vagrant init $distro"
vagrant init ${vagrant_debug:+--debug} --template Vagrantfile $distro || \
error "failed to vagrant init $distro"
fi

# If you want to force provisioning of already provisioned vm,
Expand All @@ -175,7 +176,7 @@ vm-setup() {
# cannot be called second time. But this could be used
# if the provisioning failed before kubernetes was setup.
if [ ! -z "$provision" ]; then
vagrant provision || error "failed to provision VM"
vagrant provision ${vagrant_debug:+--debug} || error "failed to provision VM"
fi

vagrant up --provider qemu || error "failed to bring up VM"
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ for POLICY_DIR in "$TESTS_ROOT_DIR"/*; do
distro=${distro:=$DEFAULT_DISTRO}
export distro

vagrant_debug=${vagrant_debug:-}
export vagrant_debug

policy_name="$(basename $POLICY_DIR)"

# Create name for the vm.
Expand Down