Skip to content

Commit 2c0dba8

Browse files
committed
Fixes the test case
1 parent 0928c13 commit 2c0dba8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docker/Dockerfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# ----- Go Builder Image ------
33
#
4-
FROM --platform=$BUILDPLATFORM golang:1.21 AS builder
4+
FROM golang:1.23 AS builder
55

66
# curl git bash
77
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -10,12 +10,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
bash \
1111
tzdata \
1212
ca-certificates \
13-
&& rm -rf /var/lib/apt/lists/*
13+
&& rm -rf /var/lib/apt/lists/*
1414

1515
#
1616
# ----- Build and Test Image -----
1717
#
18-
FROM builder as build-and-test
18+
FROM builder AS build-and-test
1919

2020
# set working directory
2121
RUN mkdir -p /go/src/pumba
@@ -60,7 +60,7 @@ 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 bats/bats:v1.10.0 AS integration-tests
6464

6565
# install required packages
6666
RUN apk add --no-cache docker iproute2
@@ -89,4 +89,4 @@ COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
8989
# this is the last command since it's never cached
9090
COPY --from=build-and-test /go/src/pumba/.bin/github.com/alexei-led/pumba /pumba
9191

92-
ENTRYPOINT ["/pumba"]
92+
ENTRYPOINT ["/pumba"]

pkg/chaos/iptables/iptables_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ func Test_runIPTables(t *testing.T) {
129129
} else {
130130
call.Return(nil)
131131
}
132-
// set StopIPTablesContainer mock call
133-
call = mockClient.On("StopIPTablesContainer", context.Background(), tt.args.cmdPrefix, tt.args.cmdSuffix, tt.args.srcIPs, tt.args.dstIPs, tt.args.sports, tt.args.dports, tt.args.iptablesImage, tt.args.pull, tt.args.dryRun)
132+
// set StopContainer mock call
133+
call = mockClient.On("StopIPTablesContainer", context.Background(), tt.args.container, tt.args.cmdPrefix, tt.args.cmdSuffix, tt.args.srcIPs, tt.args.dstIPs, tt.args.sports, tt.args.dports, tt.args.iptablesImage, tt.args.pull, tt.args.dryRun)
134134
if tt.errs.stopErr {
135135
call.Return(errors.New("test error"))
136136
} else {

0 commit comments

Comments
 (0)