summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorRalf Haferkamp <rhafer@suse.com>2020-07-29 18:41:42 +0200
committerRalf Haferkamp <rhafer@suse.com>2020-07-31 15:39:57 +0200
commitad2efbe9e1e2873e7c7f93804a9303bd2158857a (patch)
tree750c391ca50be75e2afada333080e771197473b3 /test/e2e
parent3cf8237bc0b350c72ecc9a7ea364cb2e6a1c3bc0 (diff)
downloadpodman-ad2efbe9e1e2873e7c7f93804a9303bd2158857a.tar.gz
podman-ad2efbe9e1e2873e7c7f93804a9303bd2158857a.tar.bz2
podman-ad2efbe9e1e2873e7c7f93804a9303bd2158857a.zip
Add test case for description being present in search result
Test for a specific static image and match the description to avoid regression like https://github.com/containers/podman/pull/7131 Signed-off-by: Ralf Haferkamp <rhafer@suse.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/search_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/e2e/search_test.go b/test/e2e/search_test.go
index 1e7dff697..104bb4ec8 100644
--- a/test/e2e/search_test.go
+++ b/test/e2e/search_test.go
@@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "regexp"
"strconv"
"text/template"
@@ -98,6 +99,15 @@ registries = ['{{.Host}}:{{.Port}}']`
Expect(search.LineInOutputContains("quay.io/libpod/gate")).To(BeTrue())
})
+ It("podman search image with description", func() {
+ search := podmanTest.Podman([]string{"search", "quay.io/libpod/whalesay"})
+ search.WaitWithDefaultTimeout()
+ Expect(search.ExitCode()).To(Equal(0))
+ output := fmt.Sprintf("%s", search.Out.Contents())
+ match, _ := regexp.MatchString(`(?m)^quay.io\s+quay.io/libpod/whalesay\s+Static image used for automated testing.+$`, output)
+ Expect(match).To(BeTrue())
+ })
+
It("podman search format flag", func() {
search := podmanTest.Podman([]string{"search", "--format", "table {{.Index}} {{.Name}}", "alpine"})
search.WaitWithDefaultTimeout()