Merge pull request #25858 from Luap99/prefetch
test/system: add prefetch users to use cache image
This commit is contained in:
commit
66954d7e7e
|
|
@ -61,8 +61,15 @@ function teardown() {
|
|||
vol_two="testvol2"
|
||||
run_podman $safe_opts volume create --opt o=size=4m $vol_two
|
||||
|
||||
# prefetch image to avoid registry pulls because this is using a
|
||||
# unique root which does not have the image already present.
|
||||
# _PODMAN_TEST_OPTS is used to overwrite the podman options to
|
||||
# make the function aware of the custom --root.
|
||||
_PODMAN_TEST_OPTS="$safe_opts --storage-driver $(podman_storage_driver)" _prefetch $IMAGE
|
||||
|
||||
ctrname="testctr"
|
||||
run_podman $safe_opts run -d --name=$ctrname -i -v $vol_one:/one -v $vol_two:/two $IMAGE top
|
||||
# pull never to ensure the prefetch works correctly
|
||||
run_podman $safe_opts run -d --pull=never --name=$ctrname -i -v $vol_one:/one -v $vol_two:/two $IMAGE top
|
||||
|
||||
run_podman $safe_opts exec $ctrname dd if=/dev/zero of=/one/oneMB bs=1M count=1
|
||||
run_podman 1 $safe_opts exec $ctrname dd if=/dev/zero of=/one/twoMB bs=1M count=1
|
||||
|
|
|
|||
|
|
@ -134,10 +134,12 @@ function setup() {
|
|||
@test "podman checkpoint --export, with volumes" {
|
||||
skip_if_remote "Test uses --root/--runroot, which are N/A over remote"
|
||||
|
||||
# To avoid network pull, copy $IMAGE straight to temp root
|
||||
local p_opts="$(podman_isolation_opts ${PODMAN_TMPDIR}) --events-backend file"
|
||||
run_podman save -o $PODMAN_TMPDIR/image.tar $IMAGE
|
||||
run_podman $p_opts load -i $PODMAN_TMPDIR/image.tar
|
||||
# prefetch image to avoid registry pulls because this is using a
|
||||
# unique root which does not have the image already present.
|
||||
# _PODMAN_TEST_OPTS is used to overwrite the podman options to
|
||||
# make the function aware of the custom --root.
|
||||
_PODMAN_TEST_OPTS="$p_opts --storage-driver $(podman_storage_driver)" _prefetch $IMAGE
|
||||
|
||||
# Create a volume, find unused network port, and create a webserv container
|
||||
volname=v-$(safename)
|
||||
|
|
|
|||
Loading…
Reference in New Issue