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: improve cleanup call #264

Merged
merged 1 commit into from
Nov 1, 2023
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
4 changes: 4 additions & 0 deletions tests/e2e/lib/utils
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ info_message() {
}

cleanup() {
info_message "Cleaning any existing artifacts that were generated during previous runs"
output=$(podman ps -a --format "{{.Names}}")
IFS=$'\n' # Set the internal field separator to newline

Expand All @@ -66,5 +67,8 @@ cleanup() {
rm -f ./*.node*
fi
done
info_message " - Removing podmanDualStack network..."
info_message " "
podman network rm podmanDualStack -f 1> /dev/null

}
3 changes: 2 additions & 1 deletion tests/e2e/run-test-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,14 @@ then
exit
fi

cleanup

info_message "Creating dual stack network"
podman network \
create --ipv6 --gateway fd00::1:8:1 --subnet fd00::1:8:0/112 \
--gateway 10.90.0.1 --subnet 10.90.0.0/16 podmanDualStack &> /dev/null

info_message "Cleaning any previous e2e files"
cleanup

echo
info_message "Preparing ASIL environment"
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/tools/remove-containers
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ for node in ${output}; do
podman rm "${node}" --force 1> /dev/null
fi
done

podman network rm podmanDualStack -f