diff options
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/010-images.bats | 36 | ||||
-rw-r--r-- | test/system/150-login.bats | 8 |
2 files changed, 40 insertions, 4 deletions
diff --git a/test/system/010-images.bats b/test/system/010-images.bats index 66ef53590..3224c9b42 100644 --- a/test/system/010-images.bats +++ b/test/system/010-images.bats @@ -74,4 +74,40 @@ size | [0-9]\\\+ run_podman rm my-container } +@test "podman images - filter" { + skip_if_remote "podman commit -q is broken in podman-remote" + + run_podman inspect --format '{{.ID}}' $IMAGE + iid=$output + + run_podman images --noheading --filter=after=$iid + is "$output" "" "baseline: empty results from filter (after)" + + run_podman images --noheading --filter=before=$iid + is "$output" "" "baseline: empty results from filter (before)" + + # Create a dummy container, then commit that as an image. We will + # now be able to use before/after/since queries + run_podman run --name mytinycontainer $IMAGE true + run_podman commit -q mytinycontainer mynewimage + new_iid=$output + + # (refactor common options for legibility) + opts='--noheading --no-trunc --format={{.ID}}--{{.Repository}}:{{.Tag}}' + + run_podman images ${opts} --filter=after=$iid + is "$output" "sha256:$new_iid--localhost/mynewimage:latest" "filter: after" + + # Same thing, with 'since' instead of 'after' + run_podman images ${opts} --filter=since=$iid + is "$output" "sha256:$new_iid--localhost/mynewimage:latest" "filter: since" + + run_podman images ${opts} --filter=before=mynewimage + is "$output" "sha256:$iid--$IMAGE" "filter: before" + + # Clean up + run_podman rmi mynewimage + run_podman rm mytinycontainer +} + # vim: filetype=sh diff --git a/test/system/150-login.bats b/test/system/150-login.bats index 9c9593311..e33217e14 100644 --- a/test/system/150-login.bats +++ b/test/system/150-login.bats @@ -108,8 +108,8 @@ function setup() { @test "podman login - basic test" { run_podman login --tls-verify=false \ --username ${PODMAN_LOGIN_USER} \ - --password ${PODMAN_LOGIN_PASS} \ - localhost:${PODMAN_LOGIN_REGISTRY_PORT} + --password-stdin \ + localhost:${PODMAN_LOGIN_REGISTRY_PORT} <<<"${PODMAN_LOGIN_PASS}" is "$output" "Login Succeeded!" "output from podman login" # Now log out @@ -123,8 +123,8 @@ function setup() { run_podman 125 login --tls-verify=false \ --username ${PODMAN_LOGIN_USER} \ - --password "x${PODMAN_LOGIN_PASS}" \ - $registry + --password-stdin \ + $registry <<< "x${PODMAN_LOGIN_PASS}" is "$output" \ "Error: error logging into \"$registry\": invalid username/password" \ 'output from podman login' |