/
info.go
41 lines (31 loc) · 1019 Bytes
/
info.go
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
package images
import (
"github.com/MakeNowJust/heredoc"
g "github.com/onsi/ginkgo"
exutil "github.com/openshift/origin/test/extended/util"
)
var _ = g.Describe("[Feature:ImageInfo] Image info", func() {
defer g.GinkgoRecover()
var oc *exutil.CLI
var ns string
g.AfterEach(func() {
if g.CurrentGinkgoTestDescription().Failed && len(ns) > 0 {
exutil.DumpPodLogsStartingWithInNamespace("", ns, oc)
}
})
oc = exutil.NewCLI("image-info", exutil.KubeConfigPath())
g.It("should display information about images", func() {
ns = oc.Namespace()
cli := oc.KubeFramework().PodClient()
pod := cli.Create(cliPodWithPullSecret(oc, heredoc.Docf(`
set -x
# display info about an image on quay.io
oc image info quay.io/coreos/etcd:latest
# display info about an image on quay.io
oc image info docker.io/library/mysql:latest
# display info about an image in json format
oc image info quay.io/coreos/etcd:latest -o json
`)))
cli.WaitForSuccess(pod.Name, podStartupTimeout)
})
})