diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-16 15:52:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 15:52:25 +0000 |
commit | bacb2fc526dba7214e3c8420eccc5cf22bbb1a29 (patch) | |
tree | 1e0e5dc8f71cacb030cd001734957c87b5370380 /test/system | |
parent | 978c0767fa72abfa41f720f6fab34a62e3ac7a12 (diff) | |
parent | f66ecc882df822260e41de24b1c5f44a1ba3c3ad (diff) | |
download | podman-bacb2fc526dba7214e3c8420eccc5cf22bbb1a29.tar.gz podman-bacb2fc526dba7214e3c8420eccc5cf22bbb1a29.tar.bz2 podman-bacb2fc526dba7214e3c8420eccc5cf22bbb1a29.zip |
Merge pull request #8312 from cevich/new_ubuntu_images
Cirrus: Update VM Images; Both Fedora and Ubuntu "prior" flavors run with CGroupsV1 & runc
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/600-completion.bats | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/system/600-completion.bats b/test/system/600-completion.bats index 1e43cdc41..39906704e 100644 --- a/test/system/600-completion.bats +++ b/test/system/600-completion.bats @@ -8,6 +8,17 @@ load helpers +# Returns true if we are able to podman-pause +function _can_pause() { + # Even though we're just trying completion, not an actual unpause, + # podman barfs with: + # Error: unpause is not supported for cgroupv1 rootless containers + if is_rootless && is_cgroupsv1; then + return 1 + fi + return 0 +} + function check_shell_completion() { local count=0 @@ -70,8 +81,13 @@ function check_shell_completion() { ;; *CONTAINER*) + # podman unpause fails early on rootless cgroupsv1 + if [[ $cmd = "unpause" ]] && ! _can_pause; then + continue 2 + fi + run_completion "$@" $cmd "${extra_args[@]}" "" - is "$output" ".*-$random_container_name${nl}" "Found expected container in suggestions" + is "$output" ".*-$random_container_name${nl}" "Found expected container in suggestions for '$cmd'" match=true # resume @@ -212,7 +228,9 @@ function _check_completion_end() { run_podman create --name created-$random_container_name $IMAGE run_podman run --name running-$random_container_name -d $IMAGE top run_podman run --name pause-$random_container_name -d $IMAGE top - run_podman pause pause-$random_container_name + if _can_pause; then + run_podman pause pause-$random_container_name + fi run_podman run --name exited-$random_container_name -d $IMAGE echo exited # create pods for each state |