Add the pod name when we use podman ps -p

The pod name does not appear when doing `podman ps -p`.
It is missing as the documentation says:
-p, --pod              Print the ID and name of the pod the containers are associated with

The pod name is added in the ps output and checked in unit tests.

Closes #4703

Signed-off-by: NevilleC <neville.cain@qonto.eu>
This commit is contained in:
Neville Cain
2019-12-25 02:46:39 +01:00
parent c759c3f78d
commit 8bc394ce6e
4 changed files with 51 additions and 11 deletions

View File

@ -768,7 +768,7 @@ func (r *Runtime) GetContainers(filters ...ContainerFilter) ([]*Container, error
return nil, define.ErrRuntimeStopped
}
ctrs, err := r.state.AllContainers()
ctrs, err := r.GetAllContainers()
if err != nil {
return nil, err
}