summaryrefslogtreecommitdiff
path: root/test/e2e/create_test.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-06-03 14:05:54 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-04 17:52:28 +0000
commit6d52ebdd13ad052bbf8bfa9efa4e45cafbce1fc2 (patch)
tree0fd4ccc4320ab2250810b37cacbac9ea03cba195 /test/e2e/create_test.go
parent3416e9f19466c76a42abfff7e06422a929e3b79b (diff)
downloadpodman-6d52ebdd13ad052bbf8bfa9efa4e45cafbce1fc2.tar.gz
podman-6d52ebdd13ad052bbf8bfa9efa4e45cafbce1fc2.tar.bz2
podman-6d52ebdd13ad052bbf8bfa9efa4e45cafbce1fc2.zip
Add flag to add annotations to a container
Also add annotations from the image the container was created from. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #886 Approved by: rhatdan
Diffstat (limited to 'test/e2e/create_test.go')
-rw-r--r--test/e2e/create_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index ebe4ed924..b6bc9b70d 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -54,4 +54,18 @@ var _ = Describe("Podman create", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
})
+
+ It("podman create adds annotation", func() {
+ session := podmanTest.Podman([]string{"create", "--annotation", "HELLO=WORLD", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainers()).To(Equal(1))
+
+ check := podmanTest.Podman([]string{"inspect", "-l"})
+ check.WaitWithDefaultTimeout()
+ data := check.InspectContainerToJSON()
+ value, ok := data[0].Config.Annotations["HELLO"]
+ Expect(ok).To(BeTrue())
+ Expect(value).To(Equal("WORLD"))
+ })
})