Skip to content

Commit fa0c7c7

Browse files
authored
Improve test coverage for container package (#268)
* Add tests for waitForStop and StressContainer. Improved test coverage for container package. * Add HTTP client tests and enhance test coverage for container package * Add debug step for token permissions in GitHub Actions workflow * remove debug step * Update integration tests Dockerfile and enhance error handling in tests * fix tag * remove obsolete test
1 parent fea8260 commit fa0c7c7

File tree

8 files changed

+1654
-29
lines changed

8 files changed

+1654
-29
lines changed

.github/workflows/nettools-images.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ jobs:
6262
uses: docker/metadata-action@v5
6363
with:
6464
images: ghcr.io/${{ github.repository }}/pumba-${{ matrix.image.name }}
65+
flavor: |
66+
latest=true
6567
tags: |
6668
type=semver,pattern={{version}}
6769
type=raw,value=latest

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
**/.DS_Store
1212
**/debug
1313
**/debug.test
14+
coverage.out
1415

1516
vendor

codecov.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ coverage:
22
ignore:
33
- "mocks"
44
- "**/mock*.go"
5-
5+
- "**/*_test.go"
6+
- "**/test_helper.go"
7+
- "**/testdata/**"

docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ RUN --mount=type=cache,target=/root/.cache/go-build make build TARGETOS=${TARGET
6060
#
6161
# ------ Pumba Integration Tests ------
6262
#
63-
FROM --platform=$TARGETPLATFORM bats/bats:v1.10.0 AS integration-tests
63+
FROM --platform=$TARGETPLATFORM bats/bats:1.11.1 AS integration-tests
6464

6565
# install required packages
66-
RUN apk add --no-cache docker iproute2
66+
RUN apk add --no-cache docker iproute2 iptables
6767

6868
# copy bats tests
6969
COPY ./tests /code/tests

0 commit comments

Comments
 (0)