summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-09-11 09:34:14 +0200
committerGitHub <noreply@github.com>2019-09-11 09:34:14 +0200
commit9cf852c305a9eadb5eb7471ea171e025bc15d866 (patch)
treec902be561b430c030f42d7ac52bff25b14ee579b /test
parent7ac6ed3b4b27621e7aa15da335e65ffa601fb83e (diff)
parentdf036f9f8eafe3d1355cfe9e52c69a07e8f79b63 (diff)
downloadpodman-9cf852c305a9eadb5eb7471ea171e025bc15d866.tar.gz
podman-9cf852c305a9eadb5eb7471ea171e025bc15d866.tar.bz2
podman-9cf852c305a9eadb5eb7471ea171e025bc15d866.zip
Merge pull request #3927 from openSUSE/manager-annotations
Add `ContainerManager` annotation to created containers
Diffstat (limited to 'test')
-rw-r--r--test/e2e/container_inspect_test.go45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/e2e/container_inspect_test.go b/test/e2e/container_inspect_test.go
new file mode 100644
index 000000000..91c025197
--- /dev/null
+++ b/test/e2e/container_inspect_test.go
@@ -0,0 +1,45 @@
+package integration
+
+import (
+ "os"
+
+ "github.com/containers/libpod/pkg/annotations"
+ . "github.com/containers/libpod/test/utils"
+ . "github.com/onsi/ginkgo"
+ . "github.com/onsi/gomega"
+)
+
+var _ = Describe("Podman container inspect", func() {
+ var (
+ tempdir string
+ err error
+ podmanTest *PodmanTestIntegration
+ )
+
+ BeforeEach(func() {
+ tempdir, err = CreateTempDirInTempDir()
+ if err != nil {
+ os.Exit(1)
+ }
+ podmanTest = PodmanTestCreate(tempdir)
+ podmanTest.Setup()
+ podmanTest.SeedImages()
+ })
+
+ AfterEach(func() {
+ podmanTest.CleanupPod()
+ f := CurrentGinkgoTestDescription()
+ processTestResult(f)
+ })
+
+ It("podman inspect a container for the container manager annotation", func() {
+ const testContainer = "container-inspect-test-1"
+ setup := podmanTest.RunTopContainer(testContainer)
+ setup.WaitWithDefaultTimeout()
+ Expect(setup.ExitCode()).To(Equal(0))
+
+ data := podmanTest.InspectContainer(testContainer)
+ Expect(data[0].Config.Annotations[annotations.ContainerManager]).
+ To(Equal(annotations.ContainerManagerLibpod))
+ })
+})