mirror of https://github.com/containers/podman.git
Merge pull request #21949 from edsantiago/more-flake-fixes
CI: try to fix more flakes
This commit is contained in:
commit
35a8b03267
|
|
@ -597,7 +597,8 @@ RUN touch /file
|
|||
|
||||
push := podmanTest.Podman([]string{"push", "-q", "--tls-verify=false", "--creds=" + registry.User + ":" + registry.Password, "--format=v2s2", "localhost:" + registry.Port + "/citest:latest"})
|
||||
push.WaitWithDefaultTimeout()
|
||||
Expect(push).Should(ExitCleanly())
|
||||
// Cannot ExitCleanly() because this sometimes warns "Failed, retrying in 1s"
|
||||
Expect(push).Should(Exit(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"manifest", "add", "--tls-verify=false", "--creds=" + registry.User + ":" + registry.Password, "foo", "localhost:" + registry.Port + "/citest:latest"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
|||
|
|
@ -67,13 +67,19 @@ function teardown() {
|
|||
is "$output" "running:true:false:false" \
|
||||
"State. Status:Running:Pause:Checkpointed"
|
||||
|
||||
# Pause briefly to let restarted container emit some output
|
||||
sleep 0.3
|
||||
|
||||
# Get full logs, and make sure something changed
|
||||
run_podman logs $cid
|
||||
local nlines_after="${#lines[*]}"
|
||||
assert $nlines_after -gt $nlines_before \
|
||||
# Re-fetch logs, and ensure that they continue growing.
|
||||
# Allow a short while for container process to actually restart.
|
||||
local retries=10
|
||||
while [[ $retries -gt 0 ]]; do
|
||||
run_podman logs $cid
|
||||
local nlines_after="${#lines[*]}"
|
||||
if [[ $nlines_after -gt $nlines_before ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
retries=$((retries - 1))
|
||||
done
|
||||
assert "$retries" -gt 0 \
|
||||
"Container failed to output new lines after first restore"
|
||||
|
||||
# Same thing again: test for https://github.com/containers/crun/issues/756
|
||||
|
|
@ -83,12 +89,18 @@ function teardown() {
|
|||
nlines_before="${#lines[*]}"
|
||||
run_podman container restore $cid
|
||||
|
||||
# Give container time to write new output; then confirm that something
|
||||
# was emitted
|
||||
sleep 0.3
|
||||
run_podman container logs $cid
|
||||
nlines_after="${#lines[*]}"
|
||||
assert $nlines_after -gt $nlines_before \
|
||||
# Same as above, confirm that we get new output
|
||||
retries=10
|
||||
while [[ $retries -gt 0 ]]; do
|
||||
run_podman logs $cid
|
||||
local nlines_after="${#lines[*]}"
|
||||
if [[ $nlines_after -gt $nlines_before ]]; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
retries=$((retries - 1))
|
||||
done
|
||||
assert "$retries" -gt 0 \
|
||||
"stdout went away after second restore (crun issue 756)"
|
||||
|
||||
run_podman rm -t 0 -f $cid
|
||||
|
|
|
|||
|
|
@ -769,9 +769,16 @@ EOF
|
|||
CONTAINERS_CONF_OVERRIDE="$containersConf" run_podman kube play $YAML
|
||||
run_podman container inspect --format '{{ .Config.Umask }}' $ctrInPod
|
||||
is "${output}" "0472"
|
||||
# Confirm that umask actually takes effect
|
||||
run_podman logs $ctrInPod
|
||||
is "$output" "204" "stat() on created file"
|
||||
# Confirm that umask actually takes effect. Might take a second or so.
|
||||
local retries=10
|
||||
while [[ $retries -gt 0 ]]; do
|
||||
run_podman logs $ctrInPod
|
||||
test -n "$output" && break
|
||||
sleep 0.1
|
||||
retries=$((retries - 1))
|
||||
done
|
||||
assert "$retries" -gt 0 "Timed out waiting for container output"
|
||||
assert "$output" = "204" "stat() on created file"
|
||||
|
||||
run_podman kube down $YAML
|
||||
run_podman pod rm -a
|
||||
|
|
|
|||
Loading…
Reference in New Issue