Allow users to specify logpath

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #135
Approved by: mheon
This commit is contained in:
Daniel J Walsh
2018-01-30 06:23:58 +01:00
committed by Atomic Bot
parent 6ba6ecf59b
commit 095aaaa639
13 changed files with 63 additions and 15 deletions

View File

@ -184,4 +184,16 @@ var _ = Describe("Podman run", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring("15"))
})
It("podman run log-opt", func() {
log := filepath.Join(podmanTest.TempDir, "/container.log")
session := podmanTest.Podman([]string{"run", "--rm", "--log-opt", fmt.Sprintf("path=%s", log), ALPINE, "ls"})
session.Wait(10)
fmt.Println(session.OutputToString())
Expect(session.ExitCode()).To(Equal(0))
_, err := os.Stat(log)
Expect(err).To(BeNil())
_ = os.Remove(log)
})
})