mirror of https://github.com/containers/podman.git
Merge pull request #16934 from SamirPS/fix-volume
Fix: List container with volume filter
This commit is contained in:
commit
28d04bc524
|
@ -146,7 +146,7 @@ func GenerateContainerFilterFuncs(filter string, filterValues []string, r *libpo
|
||||||
if dest != "" && (mount.Source == source && mount.Destination == dest) {
|
if dest != "" && (mount.Source == source && mount.Destination == dest) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if dest == "" && mount.Source == source {
|
if dest == "" && mount.Destination == source {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -509,4 +509,20 @@ EOF
|
||||||
is "$output" "" "Should print no output"
|
is "$output" "" "Should print no output"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "podman ps -f" {
|
||||||
|
vol1="/v1_$(random_string)"
|
||||||
|
run_podman run -d --rm --volume ${PODMAN_TMPDIR}:$vol1 $IMAGE top
|
||||||
|
cid=$output
|
||||||
|
|
||||||
|
run_podman ps --noheading --no-trunc -q -f volume=$vol1
|
||||||
|
is "$output" "$cid" "Should find container by volume"
|
||||||
|
|
||||||
|
run_podman ps --noheading --no-trunc -q --filter volume=/NoSuchVolume
|
||||||
|
is "$output" "" "ps --filter volume=/NoSuchVolume"
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
run_podman rm -f -t 0 -a
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# vim: filetype=sh
|
# vim: filetype=sh
|
||||||
|
|
Loading…
Reference in New Issue