summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/090-events.bats13
-rw-r--r--test/system/200-pod.bats34
-rw-r--r--test/system/250-systemd.bats5
3 files changed, 52 insertions, 0 deletions
diff --git a/test/system/090-events.bats b/test/system/090-events.bats
index 5af6a3793..a0b0380a2 100644
--- a/test/system/090-events.bats
+++ b/test/system/090-events.bats
@@ -116,3 +116,16 @@ function _events_disjunctive_filters() {
@test "events with disjunctive filters - default" {
_events_disjunctive_filters ""
}
+
+@test "events with events_logfile_path in containers.conf" {
+ skip_if_remote "remote does not support --events-backend"
+ events_file=$PODMAN_TMPDIR/events.log
+ containersconf=$PODMAN_TMPDIR/containers.conf
+ cat >$containersconf <<EOF
+[engine]
+events_logfile_path="$events_file"
+EOF
+ CONTAINERS_CONF="$containersconf" run_podman --events-backend=file pull $IMAGE
+ run cat $events_file
+ is "$output" ".*\"Name\":\"$IMAGE" "test"
+}
diff --git a/test/system/200-pod.bats b/test/system/200-pod.bats
index 4a3337e57..51fcea104 100644
--- a/test/system/200-pod.bats
+++ b/test/system/200-pod.bats
@@ -362,4 +362,38 @@ EOF
run_podman run --rm --pod "new:$pod_name" $IMAGE hostname
is "$output" "$pod_name" "new:POD should have hostname name set to podname"
}
+
+@test "podman rm --force to remove infra container" {
+ local pod_name="$(random_string 10 | tr A-Z a-z)"
+ run_podman create --pod "new:$pod_name" $IMAGE
+ container_ID="$output"
+ run_podman pod inspect --format "{{.InfraContainerID}}" $pod_name
+ infra_ID="$output"
+
+ run_podman 125 container rm $infra_ID
+ is "$output" ".* and cannot be removed without removing the pod"
+ run_podman 125 container rm --force $infra_ID
+ is "$output" ".* and cannot be removed without removing the pod"
+
+ run_podman container rm --depend $infra_ID
+ is "$output" ".*$infra_ID.*"
+ is "$output" ".*$container_ID.*"
+
+ # Now make sure that --force --all works as well
+ run_podman create --pod "new:$pod_name" $IMAGE
+ container_1_ID="$output"
+ run_podman create --pod "$pod_name" $IMAGE
+ container_2_ID="$output"
+ run_podman create $IMAGE
+ container_3_ID="$output"
+ run_podman pod inspect --format "{{.InfraContainerID}}" $pod_name
+ infra_ID="$output"
+
+ run_podman container rm --force --all $infraID
+ is "$output" ".*$infra_ID.*"
+ is "$output" ".*$container_1_ID.*"
+ is "$output" ".*$container_2_ID.*"
+ is "$output" ".*$container_3_ID.*"
+}
+
# vim: filetype=sh
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index c49727cc9..c47679904 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -276,4 +276,9 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
is "$output" ".*--template cannot be set" "Error message should be '--template requires --new'"
}
+@test "podman --cgroup=cgroupfs doesn't show systemd warning" {
+ DBUS_SESSION_BUS_ADDRESS= run_podman --log-level warning --cgroup-manager=cgroupfs info -f ''
+ is "$output" "" "output should be empty"
+}
+
# vim: filetype=sh