Skip to content

Commit 6fc1073

Browse files
authored
Merge pull request #28804 from Luap99/test-fixes
More test fixes for new CI
2 parents 65093e1 + c4c2778 commit 6fc1073

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

test/e2e/container_iface_name_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ var _ = Describe("Podman container interface name", func() {
101101

102102
// There is no nic created by the macvlan/ipvlan driver.
103103
defer podmanTest.removeNetwork(netName1)
104-
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "--subnet", "10.10.0.0/24", netName1})
104+
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "--subnet", "10.9.0.0/24", netName1})
105105
nc1.WaitWithDefaultTimeout()
106106
Expect(nc1).Should(ExitCleanly())
107107

@@ -115,7 +115,7 @@ var _ = Describe("Podman container interface name", func() {
115115
Expect(exec1.OutputToString()).Should(ContainSubstring("eth0"))
116116

117117
defer podmanTest.removeNetwork(netName2)
118-
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "--subnet", "10.25.40.0/24", netName2})
118+
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "--subnet", "10.25.41.0/24", netName2})
119119
nc2.WaitWithDefaultTimeout()
120120
Expect(nc2).Should(ExitCleanly())
121121

@@ -158,7 +158,7 @@ var _ = Describe("Podman container interface name", func() {
158158
createNetworkDevice(nicName1)
159159

160160
defer podmanTest.removeNetwork(netName1)
161-
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent1, "--subnet", "10.10.0.0/24", netName1})
161+
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent1, "--subnet", "10.9.1.0/24", netName1})
162162
nc1.WaitWithDefaultTimeout()
163163
Expect(nc1).Should(ExitCleanly())
164164

@@ -175,7 +175,7 @@ var _ = Describe("Podman container interface name", func() {
175175
createNetworkDevice(nicName2)
176176

177177
defer podmanTest.removeNetwork(netName2)
178-
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent2, "--subnet", "10.25.40.0/24", netName2})
178+
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent2, "--subnet", "10.25.42.0/24", netName2})
179179
nc2.WaitWithDefaultTimeout()
180180
Expect(nc2).Should(ExitCleanly())
181181

@@ -219,7 +219,7 @@ var _ = Describe("Podman container interface name", func() {
219219
createNetworkDevice(nicName1)
220220

221221
defer podmanTest.removeNetwork(netName1)
222-
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent1, "--subnet", "10.10.0.0/24", netName1})
222+
nc1 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent1, "--subnet", "10.9.2.0/24", netName1})
223223
nc1.WaitWithDefaultTimeout()
224224
Expect(nc1).Should(ExitCleanly())
225225

@@ -236,7 +236,7 @@ var _ = Describe("Podman container interface name", func() {
236236
createNetworkDevice(nicName2)
237237

238238
defer podmanTest.removeNetwork(netName2)
239-
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent2, "--subnet", "10.25.40.0/24", netName2})
239+
nc2 := podmanTest.Podman([]string{"network", "create", "-d", driverType, "-o", parent2, "--subnet", "10.25.43.0/24", netName2})
240240
nc2.WaitWithDefaultTimeout()
241241
Expect(nc2).Should(ExitCleanly())
242242

test/e2e/run_networking_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,9 +935,9 @@ EXPOSE 2004-2005/tcp`, ALPINE)
935935

936936
It("podman run with new:pod and static-ip", func() {
937937
netName := stringid.GenerateRandomID()
938-
ipAddr := "10.25.40.128"
938+
ipAddr := "10.25.44.128"
939939
podname := "testpod"
940-
create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.25.40.0/24", netName})
940+
create := podmanTest.Podman([]string{"network", "create", "--subnet", "10.25.44.0/24", netName})
941941
create.WaitWithDefaultTimeout()
942942
Expect(create).Should(ExitCleanly())
943943
defer podmanTest.removeNetwork(netName)

test/system/050-stop.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ load helpers
187187

188188
# Wait for container to acknowledge the signal. We can't use wait_for_output
189189
# because that aborts if .State.Running != true
190-
local timeout=5
190+
local timeout=10
191191
while [[ $timeout -gt 0 ]]; do
192192
run_podman logs $ctrname
193193
if [[ "$output" =~ "Received SIGTERM, ignoring" ]]; then
@@ -206,7 +206,7 @@ load helpers
206206
# Time check: make sure we were able to run 'ps' before the container
207207
# exited. If this takes too long, it means ps had to wait for lock.
208208
local delta_t=$(( $SECONDS - t0 ))
209-
assert $delta_t -le 5 "Operations took too long"
209+
assert $delta_t -le 7 "Operations took too long"
210210

211211
run_podman kill $ctrname
212212
run_podman wait $ctrname

test/system/130-kill.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ load helpers
124124
# 14761 - concurrent kill/stop must record the exit code
125125
cname=c-$(safename)
126126
run_podman run -d --replace --name=$cname $IMAGE sh -c "trap 'echo Received SIGTERM, ignoring' SIGTERM; echo READY; while :; do sleep 0.2; done"
127-
"${PODMAN_CMD[@]}" stop -t 1 $cname &
127+
"${PODMAN_CMD[@]}" stop -t 5 $cname &
128128
run_podman kill $cname
129129
run_podman wait $cname
130130
run_podman rm -f $cname

test/system/220-healthcheck.bats

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ function _check_health_log {
429429
msg="hc-msg-$(random_string)"
430430
hcStatus=$PODMAN_TMPDIR/hcStatus
431431

432+
# Disable systemd healthcheck in the background as they mess up the timings of the manual commands.
433+
export DISABLE_HC_SYSTEMD="true"
432434
run_podman run -d --name $ctr \
433435
--health-cmd "touch /tmp/abc; sleep 20; echo $msg" \
434436
$IMAGE /home/podman/pause

test/system/250-systemd.bats

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function mv-safely() {
5555

5656
# Helper to start a systemd service running a container
5757
function service_setup() {
58+
local extra_args="$1"
5859
# January 2024: we can no longer do "run_podman generate systemd" followed
5960
# by "echo $output >file", because generate-systemd is deprecated and now
6061
# says so loudly, to stderr, with no way to silence it. Since BATS gloms
@@ -65,6 +66,7 @@ function service_setup() {
6566
run_podman generate systemd --files --name \
6667
-e http_proxy -e https_proxy -e no_proxy \
6768
-e HTTP_PROXY -e HTTPS_PROXY -e NO_PROXY \
69+
$extra_args \
6870
--new $cname
6971
mv-safely "container-$cname.service" $UNIT_FILE
7072
)
@@ -359,7 +361,7 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
359361
$IMAGE /home/podman/pause
360362

361363
# run container in systemd unit
362-
service_setup
364+
service_setup "-e DISABLE_HC_SYSTEMD=true"
363365

364366
run_podman container inspect $cname --format "{{.ID}}"
365367
oldID="$output"

0 commit comments

Comments
 (0)