mirror of
https://github.com/containers/podman.git
synced 2025-10-15 02:06:42 +08:00
e2e: ExitCleanly(): more low-hanging fruit
Commit 1 of 2. More easy ones: test files that either work with ExitCleanly() or require very, very simple tweaks. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -3,9 +3,9 @@ package integration
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run memory", func() {
|
||||
@ -23,7 +23,7 @@ var _ = Describe("Podman run memory", func() {
|
||||
session = podmanTest.Podman([]string{"run", "--memory=40m", ALPINE, "cat", "/sys/fs/cgroup/memory/memory.limit_in_bytes"})
|
||||
}
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session).Should(ExitCleanly())
|
||||
Expect(session.OutputToString()).To(Equal("41943040"))
|
||||
})
|
||||
|
||||
@ -37,7 +37,7 @@ var _ = Describe("Podman run memory", func() {
|
||||
}
|
||||
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session).Should(ExitCleanly())
|
||||
Expect(session.OutputToString()).To(Equal("41943040"))
|
||||
})
|
||||
|
||||
@ -55,7 +55,7 @@ var _ = Describe("Podman run memory", func() {
|
||||
expect = "31457280"
|
||||
}
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session).Should(ExitCleanly())
|
||||
Expect(session.OutputToString()).To(Equal(expect))
|
||||
})
|
||||
|
||||
@ -66,7 +66,7 @@ var _ = Describe("Podman run memory", func() {
|
||||
SkipIfCgroupV2("memory-swappiness not supported on cgroupV2")
|
||||
session := podmanTest.Podman([]string{"run", fmt.Sprintf("--memory-swappiness=%s", limit), ALPINE, "cat", "/sys/fs/cgroup/memory/memory.swappiness"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session).Should(ExitCleanly())
|
||||
Expect(session.OutputToString()).To(Equal(limit))
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user