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:
Ed Santiago
2023-09-19 16:01:41 -06:00
parent 696f4a6a4d
commit a50fb7e061
35 changed files with 585 additions and 591 deletions

View File

@ -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))
})
}