From 0d7e6fa22fa15254e1599b9f41ab9be2650cff71 Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Wed, 10 Jan 2018 09:35:23 -0500 Subject: 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 Closes: #241 Approved by: rhatdan --- test/podman_search.bats | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/podman_search.bats (limited to 'test') 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 -- cgit v1.2.3-54-g00ecf