diff options
author | Alexandre Fourcat <afourcat@gmail.com> | 2021-01-10 18:59:38 +0900 |
---|---|---|
committer | Alexandre Fourcat <afourcat@gmail.com> | 2021-01-10 19:04:23 +0900 |
commit | e1302a302314cb6b7a5558c0b8c36ce722d5cc20 (patch) | |
tree | f2f02772db068965e023f684416ce74a2e7b929d /test | |
parent | 49db79e735acd2c693762eaff62680cd9a8cb60b (diff) | |
download | podman-e1302a302314cb6b7a5558c0b8c36ce722d5cc20.tar.gz podman-e1302a302314cb6b7a5558c0b8c36ce722d5cc20.tar.bz2 podman-e1302a302314cb6b7a5558c0b8c36ce722d5cc20.zip |
Adding json formatting to `--list-tags` option in `podman search`
command.
Data is formatted following this JSON structure:
```json
{
"Name": "...",
"Tags": ["...", "...", "..."]
}
```
Closes: #8740.
Signed-off-by: Alexandre Fourcat <afourcat@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/search_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go index f809c5afe..4a04a88cd 100644 --- a/test/e2e/search_test.go +++ b/test/e2e/search_test.go @@ -124,6 +124,15 @@ registries = ['{{.Host}}:{{.Port}}']` Expect(search.OutputToString()).To(ContainSubstring("docker.io/library/alpine")) }) + It("podman search format json list tags", func() { + search := podmanTest.Podman([]string{"search", "--list-tags", "--format", "json", "alpine"}) + search.WaitWithDefaultTimeout() + Expect(search.ExitCode()).To(Equal(0)) + Expect(search.IsJSONOutputValid()).To(BeTrue()) + Expect(search.OutputToString()).To(ContainSubstring("docker.io/library/alpine")) + Expect(search.OutputToString()).To(ContainSubstring("3.10")) + }) + It("podman search no-trunc flag", func() { search := podmanTest.Podman([]string{"search", "--no-trunc", "alpine"}) search.WaitWithDefaultTimeout() |