mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
CI: make 125-import parallel-safe
Add a bunch of safenames, and ci:parallel tags, and one workaround for a buildah parallelization bug Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
load helpers
|
load helpers
|
||||||
|
|
||||||
|
# bats test_tags=ci:parallel
|
||||||
@test "podman import" {
|
@test "podman import" {
|
||||||
local archive=$PODMAN_TMPDIR/archive.tar
|
local archive=$PODMAN_TMPDIR/archive.tar
|
||||||
local random_content=$(random_string 12)
|
local random_content=$(random_string 12)
|
||||||
@ -13,9 +14,10 @@ load helpers
|
|||||||
local random_tag=t0$(random_string 7 | tr A-Z a-z)
|
local random_tag=t0$(random_string 7 | tr A-Z a-z)
|
||||||
local fqin=localhost/$random_name:$random_tag
|
local fqin=localhost/$random_name:$random_tag
|
||||||
|
|
||||||
run_podman run --name import $IMAGE sh -c "echo ${random_content} > /random.txt"
|
cname=c-import-$(safename)
|
||||||
run_podman export import -o $archive
|
run_podman run --name $cname $IMAGE sh -c "echo ${random_content} > /random.txt"
|
||||||
run_podman rm -t 0 -f import
|
run_podman export $cname -o $archive
|
||||||
|
run_podman rm -t 0 -f $cname
|
||||||
|
|
||||||
# Simple import
|
# Simple import
|
||||||
run_podman import -q $archive
|
run_podman import -q $archive
|
||||||
@ -45,7 +47,7 @@ load helpers
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Integration tag to catch future breakage in tar, e.g. #19407
|
# Integration tag to catch future breakage in tar, e.g. #19407
|
||||||
# bats test_tags=distro-integration
|
# bats test_tags=distro-integration, ci:parallel
|
||||||
@test "podman export, alter tarball, re-import" {
|
@test "podman export, alter tarball, re-import" {
|
||||||
# FIXME: #21373 - tar < 1.35 is broken.
|
# FIXME: #21373 - tar < 1.35 is broken.
|
||||||
# Remove this skip once all VMs are updated to 1.35.2 or above
|
# Remove this skip once all VMs are updated to 1.35.2 or above
|
||||||
@ -69,13 +71,14 @@ ADD testfile1 /tmp
|
|||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
b_img=before_change_img
|
b_img=img-before-$(safename)
|
||||||
b_cnt=before_change_cnt
|
b_cnt=ctr-before-$(safename)
|
||||||
a_img=after_change_img
|
a_img=img-after-$(safename)
|
||||||
a_cnt=after_change_cnt
|
a_cnt=ctr-after-$(safename)
|
||||||
|
|
||||||
# Build from Dockerfile FROM non-existing local image
|
# Build from Dockerfile FROM non-existing local image
|
||||||
run_podman build -t $b_img $PODMAN_TMPDIR
|
# --layers=false needed to work around buildah#5674 parallel flake
|
||||||
|
run_podman build -t $b_img --layers=false $PODMAN_TMPDIR
|
||||||
run_podman create --name $b_cnt $b_img
|
run_podman create --name $b_cnt $b_img
|
||||||
|
|
||||||
# Export built container as tarball
|
# Export built container as tarball
|
||||||
|
Reference in New Issue
Block a user