diff options
author | umohnani8 <umohnani@redhat.com> | 2018-01-10 09:35:23 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-06 18:09:31 +0000 |
commit | 0d7e6fa22fa15254e1599b9f41ab9be2650cff71 (patch) | |
tree | bf7997d2e3259788a79b4ebcfab3dab1e8f655a3 /test/podman_search.bats | |
parent | 1a48a7a7c0dafe98ed4c8461adabc6b8ece1a8c3 (diff) | |
download | podman-0d7e6fa22fa15254e1599b9f41ab9be2650cff71.tar.gz podman-0d7e6fa22fa15254e1599b9f41ab9be2650cff71.tar.bz2 podman-0d7e6fa22fa15254e1599b9f41ab9be2650cff71.zip |
Add podman search command
podman search queries a registry for a matching image and prints
the output.
I added a new flag called "registry" giving the user the option
to search a specific registry if they don't want to search all
their default registries.
Signed-off-by: umohnani8 <umohnani@redhat.com>
Closes: #241
Approved by: rhatdan
Diffstat (limited to 'test/podman_search.bats')
-rw-r--r-- | test/podman_search.bats | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/podman_search.bats b/test/podman_search.bats new file mode 100644 index 000000000..07621d722 --- /dev/null +++ b/test/podman_search.bats @@ -0,0 +1,43 @@ +#!/usr/bin/env bats + +load helpers + +function teardown() { + cleanup_test +} + +@test "podman search" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman search registry flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search --registry registry.fedoraproject.org fedora + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman search filter flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search --filter=is-official alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman search format flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search --format "table {{.Index}} {{.Name}}" alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman search no-trunc flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search --no-trunc alpine + echo "$output" + [ "$status" -eq 0 ] +} + +@test "podman search limit flag" { + run ${PODMAN_BINARY} ${PODMAN_OPTIONS} search --limit 3 alpine + echo "$output" + [ "$status" -eq 0 ] +}
\ No newline at end of file |