@@ -14,7 +14,7 @@ function setup() {
1414
1515function teardown() {
1616 # Ignore exit status: this is just a backup stop in case tests failed
17- run systemctl stop " $SERVICE_NAME "
17+ run systemctl-user stop " $SERVICE_NAME "
1818 rm -f $PODMAN_TMPDIR /myunix.sock
1919
2020 basic_teardown
@@ -25,7 +25,7 @@ function teardown() {
2525
2626 URL=unix:$PODMAN_TMPDIR /myunix.sock
2727
28- systemd-run --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0
28+ systemd-run-user --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0
2929 wait_for_file $PODMAN_TMPDIR /myunix.sock
3030
3131 # Variable works
@@ -44,7 +44,7 @@ function teardown() {
4444 run --rm -i $IMAGE /bin/sh -c ' echo -n foo; sleep 0.1; echo -n bar; sleep 0.1; echo -n baz'
4545 is " $output " foobarbaz
4646
47- systemctl stop $SERVICE_NAME
47+ systemctl-user stop $SERVICE_NAME
4848 rm -f $PODMAN_TMPDIR /myunix.sock
4949}
5050
@@ -54,7 +54,7 @@ function teardown() {
5454 port=$( random_free_port)
5555 URL=tcp://127.0.0.1:$port
5656
57- systemd-run --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0
57+ systemd-run-user --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0
5858 wait_for_port 127.0.0.1 $port
5959
6060 # Variable works
@@ -73,7 +73,7 @@ function teardown() {
7373 run --rm -i $IMAGE /bin/sh -c ' echo -n foo; sleep 0.1; echo -n bar; sleep 0.1; echo -n baz'
7474 is " $output " foobarbaz
7575
76- systemctl stop $SERVICE_NAME
76+ systemctl-user stop $SERVICE_NAME
7777}
7878
7979@test " tls remote" {
@@ -82,7 +82,7 @@ function teardown() {
8282 port=$( random_free_port)
8383 URL=tcp://127.0.0.1:$port
8484
85- systemd-run --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0 \
85+ systemd-run-user --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0 \
8686 --tls-key=" ${REMOTESYSTEM_TLS_SERVER_KEY} " \
8787 --tls-cert=" ${REMOTESYSTEM_TLS_SERVER_CRT} "
8888 wait_for_port 127.0.0.1 $port
@@ -106,7 +106,7 @@ function teardown() {
106106 run --rm -i $IMAGE /bin/sh -c ' echo -n foo; sleep 0.1; echo -n bar; sleep 0.1; echo -n baz'
107107 is " $output " foobarbaz
108108
109- systemctl stop $SERVICE_NAME
109+ systemctl-user stop $SERVICE_NAME
110110}
111111
112112@test " mtls remote" {
@@ -115,7 +115,7 @@ function teardown() {
115115 port=$( random_free_port)
116116 URL=tcp://127.0.0.1:$port
117117
118- systemd-run --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0 \
118+ systemd-run-user --unit=$SERVICE_NAME ${PODMAN%% -remote* } system service $URL --time=0 \
119119 --tls-client-ca=" ${REMOTESYSTEM_TLS_CA_CRT} " \
120120 --tls-key=" ${REMOTESYSTEM_TLS_SERVER_KEY} " \
121121 --tls-cert=" ${REMOTESYSTEM_TLS_SERVER_CRT} "
@@ -146,5 +146,5 @@ function teardown() {
146146 run --rm -i $IMAGE /bin/sh -c ' echo -n foo; sleep 0.1; echo -n bar; sleep 0.1; echo -n baz'
147147 is " $output " foobarbaz
148148
149- systemctl stop $SERVICE_NAME
149+ systemctl-user stop $SERVICE_NAME
150150}
0 commit comments