summaryrefslogtreecommitdiff
path: root/test/e2e/top_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/top_test.go')
-rw-r--r--test/e2e/top_test.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/e2e/top_test.go b/test/e2e/top_test.go
index 067358468..2d3a5629c 100644
--- a/test/e2e/top_test.go
+++ b/test/e2e/top_test.go
@@ -3,7 +3,6 @@
package integration
import (
- "fmt"
"os"
. "github.com/containers/libpod/test/utils"
@@ -24,14 +23,15 @@ var _ = Describe("Podman top", func() {
os.Exit(1)
}
podmanTest = PodmanTestCreate(tempdir)
+ podmanTest.Setup()
podmanTest.RestoreAllArtifacts()
})
AfterEach(func() {
podmanTest.Cleanup()
f := CurrentGinkgoTestDescription()
- timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
- GinkgoWriter.Write([]byte(timedResult))
+ processTestResult(f)
+
})
It("podman top without container name or id", func() {
@@ -65,6 +65,17 @@ var _ = Describe("Podman top", func() {
Expect(len(result.OutputToStringArray())).To(BeNumerically(">", 1))
})
+ It("podman container top on container", func() {
+ session := podmanTest.Podman([]string{"container", "run", "-d", ALPINE, "top", "-d", "2"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ result := podmanTest.Podman([]string{"container", "top", "-l"})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(len(result.OutputToStringArray())).To(BeNumerically(">", 1))
+ })
+
It("podman top with options", func() {
session := podmanTest.Podman([]string{"run", "-d", ALPINE, "top", "-d", "2"})
session.WaitWithDefaultTimeout()