summaryrefslogtreecommitdiff
path: root/test/podman_search.bats
blob: 07621d722660be40af0d268e2d00238e0696c711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 ]
}