mirror of
https://github.com/containers/podman.git
synced 2025-06-22 09:58:10 +08:00
Merge pull request #9445 from jmguzik/no-header-info-for-systemd-generation
No header info for systemd generation
This commit is contained in:
@ -62,6 +62,42 @@ var _ = Describe("Podman generate systemd", func() {
|
||||
Expect(session.ErrorToString()).To(ContainSubstring("bogus is not a valid restart policy"))
|
||||
})
|
||||
|
||||
It("podman generate systemd with --no-header=true", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--name", "foobar", "alpine", "top"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"generate", "systemd", "foobar", "--no-header=true"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
Expect(session.OutputToString()).NotTo(ContainSubstring("autogenerated by"))
|
||||
})
|
||||
|
||||
It("podman generate systemd with --no-header", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--name", "foobar", "alpine", "top"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"generate", "systemd", "foobar", "--no-header"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
Expect(session.OutputToString()).NotTo(ContainSubstring("autogenerated by"))
|
||||
})
|
||||
|
||||
It("podman generate systemd with --no-header=false", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--name", "foobar", "alpine", "top"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
session = podmanTest.Podman([]string{"generate", "systemd", "foobar", "--no-header=false"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
Expect(session.OutputToString()).To(ContainSubstring("autogenerated by"))
|
||||
})
|
||||
|
||||
It("podman generate systemd good timeout value", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--name", "foobar", "alpine", "top"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
Reference in New Issue
Block a user