@@ -92,7 +92,14 @@ function generate_service() {
92
92
93
93
run_podman create $extraArgs --name $cname $label $target_img $command
94
94
95
- (cd $UNIT_DIR ; run_podman generate systemd --new --files --name $requires $cname )
95
+ # podman-remote will give warning saying the generated units should be placed on the remote system
96
+ if ! is_remote; then
97
+ (cd $UNIT_DIR ; run_podman generate systemd --new --files --name $requires $cname )
98
+ else
99
+
100
+ (cd $UNIT_DIR ; run_podman 0+w generate systemd --new --files --name $requires $cname )
101
+ fi
102
+
96
103
echo " container-$cname " >> $SNAME_FILE
97
104
run_podman rm -t 0 -f $cname
98
105
@@ -164,7 +171,13 @@ function _confirm_update() {
164
171
archive=$PODMAN_TMPDIR /archive.tar
165
172
run_podman save -o $archive $IMAGE
166
173
run_podman 125 create --label io.containers.autoupdate=registry docker-archive:$archive
167
- is " $output " " .*Error: auto updates require the docker image transport but image is of transport \" docker-archive\" "
174
+
175
+ # Remote gives different error message
176
+ if ! is_remote; then
177
+ is " $output " " .*Error: auto updates require the docker image transport but image is of transport \" docker-archive\" "
178
+ else
179
+ is " $output " " .*Error: unsupported transport docker-archive in \" docker-archive:$archive \" : only docker transport is supported"
180
+ fi
168
181
169
182
run_podman rmi $shortname
170
183
}
@@ -199,7 +212,12 @@ function _confirm_update() {
199
212
200
213
since=$( date --iso-8601=seconds)
201
214
run_podman auto-update --rollback=false --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
202
- is " $output " " Trying to pull.*" " Image is updated."
215
+
216
+ # Trying to pull is not logged for podman-remote
217
+ if ! is_remote; then
218
+ is " $output " " Trying to pull.*" " Image is updated."
219
+ fi
220
+
203
221
is " $output " " .*container-$ctr_parent .service,quay.io/libpod/alpine:latest,true,registry.*" " Image is updated."
204
222
run_podman events --filter type=system --since $since --stream=false
205
223
is " $output " " .* system auto-update"
@@ -238,7 +256,12 @@ function _confirm_update() {
238
256
containerID=" $output "
239
257
240
258
run_podman auto-update --format " {{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
241
- is " $output " " Trying to pull.*" " Image is updated."
259
+
260
+ # Trying to pull is not logged for podman-remote
261
+ if ! is_remote; then
262
+ is " $output " " Trying to pull.*" " Image is updated."
263
+ fi
264
+
242
265
is " $output " " .*container-$cname .service,$image :latest,rolled back,registry.*" " Image has been rolled back."
243
266
244
267
run_podman container inspect --format " {{.Image}}" $cname
385
408
update_log=$output
386
409
assert " $update_log " =~ ' .*Error: auto-updating container "[0-9a-f]{64}": invalid auto-update policy.*' " invalid policy setup"
387
410
388
- local n_updated=$( grep -c ' Trying to pull' <<< " $update_log" )
389
- is " $n_updated " " 2" " Number of images updated from registry."
411
+ # Trying to pull is not logged for podman-remote
412
+ if ! is_remote; then
413
+ local n_updated=$( grep -c ' Trying to pull' <<< " $update_log" )
414
+ is " $n_updated " " 2" " Number of images updated from registry."
415
+ fi
390
416
391
417
for cname in " ${! expect_update[@]} " ; do
392
418
is " $update_log " " .*$cname .*" " container with auto-update policy image updated"
472
498
}
473
499
474
500
@test " podman-kube@.service template with rollback" {
501
+ skip_if_remote " tests depend on podman kube play --service-container which does not work with podman-remote"
502
+
475
503
# sdnotify fails with runc 1.0.0-3-dev2 on Ubuntu. Let's just
476
504
# assume that we work only with crun, nothing else.
477
505
# [copied from 260-sdnotify.bats]
586
614
587
615
# cd into the unit dir to generate the two files.
588
616
pushd " $UNIT_DIR "
589
- run_podman generate systemd --name --new --files $podname
617
+
618
+ # podman-remote will give warning saying the generated units should be placed on the remote system
619
+ if ! is_remote; then
620
+ run_podman generate systemd --name --new --files $podname
621
+ else
622
+
623
+ run_podman 0+w generate systemd --name --new --files $podname
624
+ fi
625
+
626
+
590
627
is " $output " " .*$podunit .*"
591
628
is " $output " " .*$ctrunit .*"
592
629
popd
0 commit comments