diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-20 09:49:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 09:49:22 -0400 |
commit | 7bcec8697fc877345de6220d2766ebe36e7158aa (patch) | |
tree | fdbb5ad87cc78394ac7fa2f2e6bd5a1c5fe698f0 /test/system | |
parent | 62c14dcc4d62e01d585149adfb2900a55cc531a6 (diff) | |
parent | 8352e5bc3b280ecc0e9be45e6911fd6f8b9b45f0 (diff) | |
download | podman-7bcec8697fc877345de6220d2766ebe36e7158aa.tar.gz podman-7bcec8697fc877345de6220d2766ebe36e7158aa.tar.bz2 podman-7bcec8697fc877345de6220d2766ebe36e7158aa.zip |
Merge pull request #10219 from vrothberg/image-events
add libimage events
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/090-events.bats | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/system/090-events.bats b/test/system/090-events.bats index 8a9db41fa..19bee5506 100644 --- a/test/system/090-events.bats +++ b/test/system/090-events.bats @@ -25,3 +25,39 @@ load helpers run_podman events --filter type=container --filter container=$cname --filter event=start --stream=false is "$output" "$expect" "filtering just by label" } + +@test "image events" { + skip_if_remote "FIXME: remove events on podman-remote seem to be broken" + pushedDir=$PODMAN_TMPDIR/dir + mkdir -p $pushedDir + + tarball=$PODMAN_TMPDIR/ball.tar + + run_podman image inspect --format "{{.ID}}" $IMAGE + imageID="$output" + + t0=$(date --iso-8601=seconds) + tag=registry.com/$(random_string 10 | tr A-Z a-z) + + # Force using the file backend since the journal backend is eating events + # (see containers/podman/pull/10219#issuecomment-842325032). + run_podman --events-backend=file push $IMAGE dir:$pushedDir + run_podman --events-backend=file save $IMAGE -o $tarball + run_podman --events-backend=file load -i $tarball + run_podman --events-backend=file pull docker-archive:$tarball + run_podman --events-backend=file tag $IMAGE $tag + run_podman --events-backend=file untag $IMAGE $tag + run_podman --events-backend=file tag $IMAGE $tag + run_podman --events-backend=file rmi $tag + + run_podman --events-backend=file events --stream=false --filter type=image --since $t0 + is "$output" ".*image push $imageID dir:$pushedDir +.*image save $imageID $tarball +.*image loadfromarchive *$tarball +.*image pull *docker-archive:$tarball +.*image tag $imageID $tag +.*image untag $imageID $tag:latest +.*image tag $imageID $tag +.*image remove $imageID $tag.*" \ + "podman events" +} |