aboutsummaryrefslogtreecommitdiff
path: root/test/system/250-systemd.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-07-18 11:37:09 -0600
committerEd Santiago <santiago@redhat.com>2022-07-18 13:06:09 -0600
commit1f0116817da3cbdd8ba75c2ede4c148bca7f296a (patch)
tree4095ec22e34dae12cf0187d080dd96fcc504e974 /test/system/250-systemd.bats
parent5e4d72943448d0e7ff5ea94c133e08fdaf0a5969 (diff)
downloadpodman-1f0116817da3cbdd8ba75c2ede4c148bca7f296a.tar.gz
podman-1f0116817da3cbdd8ba75c2ede4c148bca7f296a.tar.bz2
podman-1f0116817da3cbdd8ba75c2ede4c148bca7f296a.zip
system tests: new system-service bats file
Followup to #14957, which added a new test that doesn't actually belong in the 250-systemd.bats file. It was copy-pasted from another test that doesn't belong there. Move both tests to a new .bats file, because (1) they need a custom cleanup, and (2) one of the tests should very definitely run under podman-remote, and the 250 bats file has a global skip_if_remote(). Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/250-systemd.bats')
-rw-r--r--test/system/250-systemd.bats46
1 files changed, 0 insertions, 46 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 70ae76eb8..9a91501dd 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -296,8 +296,6 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
}
@test "podman-kube@.service template" {
- skip_if_remote "systemd units do not work with remote clients"
-
# If running from a podman source directory, build and use the source
# version of the play-kube-@ unit file
unit_name="podman-kube@.service"
@@ -375,48 +373,4 @@ EOF
rm -f $UNIT_DIR/$unit_name
}
-@test "podman-system-service containers survive service stop" {
- skip_if_remote "N/A under podman-remote"
-
- SERVICE_NAME=podman-service-$(random_string)
- port=$(random_free_port)
- URL=tcp://127.0.0.1:$port
-
- systemd-run --unit=$SERVICE_NAME $PODMAN system service $URL --time=0
- wait_for_port 127.0.0.1 $port
-
- # Start a long-running container.
- cname=keeps-running
- run_podman --url $URL run -d --name $cname $IMAGE top -d 2
-
- run_podman container inspect -l --format "{{.State.Running}}"
- is "$output" "true" "This should never fail"
-
- systemctl stop $SERVICE_NAME
-
- run_podman container inspect $cname --format "{{.State.Running}}"
- is "$output" "true" "Container is still running after podman server stops"
-
- run_podman rm -f -t 0 $cname
-}
-
-@test "podman-system-service containers --host" {
- skip_if_remote "N/A under podman-remote"
-
- SERVICE_NAME=podman-service-$(random_string)
- port=$(random_free_port)
- URL=tcp://127.0.0.1:$port
-
- systemd-run --unit=$SERVICE_NAME $PODMAN system service $URL --time=0
- wait_for_port 127.0.0.1 $port
-
- run_podman --host $URL run --rm $IMAGE true
- run_podman -H $URL run --rm $IMAGE true
-
- systemctl stop $SERVICE_NAME
-
- # Make sure the option is actually connecting
- run_podman 125 --host $URL run --rm $IMAGE true
- assert "$output" =~ "Cannot connect to Podman.*connection refused"
-}
# vim: filetype=sh