summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-06-29 10:53:59 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-29 15:36:34 +0200
commit43714cac215ebf63b6f3e91b003b6e5ac5de5fed (patch)
tree38647d10ffc1f9367b7c85cc5969f0c57b72f8ce /test
parent673116c063f173ae7ff799a920f9c1ca28194b9d (diff)
downloadpodman-43714cac215ebf63b6f3e91b003b6e5ac5de5fed.tar.gz
podman-43714cac215ebf63b6f3e91b003b6e5ac5de5fed.tar.bz2
podman-43714cac215ebf63b6f3e91b003b6e5ac5de5fed.zip
systemd system test: run auto-update
Run `podman auto-update` in the systemd system tests. Note that this is a first step to at least exercise parts of `auto-update` in the CI. The service won't get updated just yet as we need to set up a local registry, and push a new image. I do not have enough time at the moment to do that but consider this change already as an improvement. We are experiencing some issues in #6793 w.r.t. to auto-updates but couldn't track down the root cause yet. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/250-systemd.bats8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 4bee13414..b7035cdda 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -41,7 +41,7 @@ function teardown() {
fi
cname=$(random_string)
- run_podman create --name $cname --detach $IMAGE top
+ run_podman create --name $cname --label "io.containers.autoupdate=image" --detach $IMAGE top
run_podman generate systemd --new $cname
echo "$output" > "$UNIT_FILE"
@@ -64,6 +64,12 @@ function teardown() {
run_podman logs $cname
is "$output" ".*Load average:.*" "running container 'top'-like output"
+ # Exercise `podman auto-update`.
+ # TODO: this will at least run auto-update code but won't perform an update
+ # since the image didn't change. We need to improve on that and run
+ # an image from a local registry instead.
+ run_podman auto-update
+
# All good. Stop service, clean up.
run $SYSTEMCTL stop "$SERVICE_NAME"
if [ $status -ne 0 ]; then