Merge pull request #16475 from Darth-Mera/restartsec-fix

Add restart-sec for container service files
This commit is contained in:
OpenShift Merge Robot
2022-11-10 20:23:06 +00:00
committed by GitHub
3 changed files with 62 additions and 0 deletions

View File

@@ -387,6 +387,15 @@ var _ = Describe("Podman generate systemd", func() {
// Grepping the output (in addition to unit tests)
Expect(session.OutputToString()).To(ContainSubstring("RestartSec=15"))
n = podmanTest.Podman([]string{"create", "--name", "foocontainer", "alpine", "top"})
n.WaitWithDefaultTimeout()
Expect(n).Should(Exit(0))
session2 := podmanTest.Podman([]string{"generate", "systemd", "--restart-sec", "15", "--name", "foocontainer"})
session2.WaitWithDefaultTimeout()
Expect(session2).Should(Exit(0))
Expect(session2.OutputToString()).To(ContainSubstring("RestartSec=15"))
})
It("podman generate systemd --new=false pod", func() {