summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-28 15:15:51 +0200
committerGitHub <noreply@github.com>2022-03-28 15:15:51 +0200
commitffe87c0bdfdd5f4be596731b2a31c44745a5dbfa (patch)
tree4f83af8ff1f361598613a022d18e3bf5bb6554e0 /test
parente1699d8591ab87717ae018583c896561c43efb29 (diff)
parent82ed99b6afa9ec67539afd6e3d9e299ea5c4e74b (diff)
downloadpodman-ffe87c0bdfdd5f4be596731b2a31c44745a5dbfa.tar.gz
podman-ffe87c0bdfdd5f4be596731b2a31c44745a5dbfa.tar.bz2
podman-ffe87c0bdfdd5f4be596731b2a31c44745a5dbfa.zip
Merge pull request #13677 from flouthoc/rename-event
libpod, event: generate a valid event on container `rename` operation
Diffstat (limited to 'test')
-rw-r--r--test/e2e/rename_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/e2e/rename_test.go b/test/e2e/rename_test.go
index c146eb410..ef90c3f22 100644
--- a/test/e2e/rename_test.go
+++ b/test/e2e/rename_test.go
@@ -74,6 +74,23 @@ var _ = Describe("podman rename", func() {
Expect(ps.OutputToString()).To(ContainSubstring(newName))
})
+ It("Successfully rename a created container and test event generated", func() {
+ ctrName := "testCtr"
+ ctr := podmanTest.Podman([]string{"create", "--name", ctrName, ALPINE, "top"})
+ ctr.WaitWithDefaultTimeout()
+ Expect(ctr).Should(Exit(0))
+
+ newName := "aNewName"
+ rename := podmanTest.Podman([]string{"rename", ctrName, newName})
+ rename.WaitWithDefaultTimeout()
+ Expect(rename).Should(Exit(0))
+
+ result := podmanTest.Podman([]string{"events", "--stream=false", "--filter", "container=aNewName"})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(ContainSubstring("rename"))
+ })
+
It("Successfully rename a running container", func() {
ctrName := "testCtr"
ctr := podmanTest.Podman([]string{"run", "-d", "--name", ctrName, ALPINE, "top"})