infra/abi: refactor ContainerRm

The function grew into a big hairy ball over time and I personally
refrained from touching it as it seemed fragile.  Hence, refactor
the function into something more comprehensible and maintainable.
There is still potential for improvement but I want to tackle one
thing at a time.

[NO NEW TESTS NEEDED] as it shouldn't change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-12-21 09:47:56 +01:00
parent aecb5d3853
commit 1e84e1a8db
2 changed files with 38 additions and 80 deletions

View File

@@ -108,7 +108,7 @@ load helpers
@test "podman container rm --force bogus" {
run_podman 1 container rm bogus
is "$output" "Error: no container with name or ID \"bogus\" found: no such container" "Should print error"
is "$output" "Error: no container with ID or name \"bogus\" found: no such container" "Should print error"
run_podman container rm --force bogus
is "$output" "" "Should print no output"
}