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

Remove containers used in commit checks after running #17

Merged
merged 2 commits into from
Jan 8, 2025
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
9 changes: 5 additions & 4 deletions scripts/commit-check
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# This script runs all commit checks EXCEPT for checking that the version is
# correctly incermented, which is done via a seperate github action.
# correctly incremented, which is done via a separate github action.

set -e

# shellcheck disable=SC2317
function cleanup()
{
echo
Expand Down Expand Up @@ -68,7 +69,7 @@ podman build tests/ -t helm-tests --network host

echo
echo "Running host-check unit tests..."
if ! podman run -v "$PWD/:/charts" helm-tests bats tests/ut/host-check; then
if ! podman run --rm -v "$PWD/:/charts" helm-tests bats tests/ut/host-check; then
echo "host-check unit tests failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
Expand All @@ -77,7 +78,7 @@ fi

echo
echo "Running Control Plane unit tests..."
if ! podman run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-control-plane; then
if ! podman run --rm -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-control-plane; then
echo "Control Plane unit tests failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
Expand All @@ -86,7 +87,7 @@ fi

echo
echo "Running vRouter unit tests..."
if ! podman run -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-vrouter; then
if ! podman run --rm -v "$PWD/:/charts" helm-tests bats tests/ut/xrd-vrouter; then
echo "vRouter unit tests failed, check output and fix issues." >&2
FAILURES=$((FAILURES+1))
else
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ The unit tests can be run using any container manager. For example, using Docke

```
docker build . -t helm-tests
docker run -v "$PWD/../:/charts" helm-tests bats tests/ut/[host-check, xrd-control-plane or xrd-vrouter]
docker run --rm -v "$PWD/../:/charts" helm-tests bats tests/ut/[host-check, xrd-control-plane or xrd-vrouter]
```
Loading