mirror of
https://github.com/containers/podman.git
synced 2026-03-13 08:01:19 +08:00
libpod: Validate that log tag requires journald driver
Currently validation that log tag requires journald driver is done in several places and emits only warning. Making it an error and moving to `(c *Container) validate()` is a more correct approach. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
@@ -638,6 +638,12 @@ var _ = Describe("Podman logs", func() {
|
||||
Expect(logc.OutputToString()).To(Equal("podman"))
|
||||
})
|
||||
|
||||
It("log tag with non-journald driver fails", func() {
|
||||
logc := podmanTest.Podman([]string{"run", "--log-driver", "k8s-file", "--log-opt", "tag=mytag", ALPINE, "true"})
|
||||
logc.WaitWithDefaultTimeout()
|
||||
Expect(logc).To(ExitWithError(125, "log tags can only be used with the journald log driver"))
|
||||
})
|
||||
|
||||
It("podman pod logs with container names", func() {
|
||||
SkipIfRemote("Remote can only process one container at a time")
|
||||
podName := "testPod"
|
||||
|
||||
Reference in New Issue
Block a user