podman: fix --log-opt=path=%s
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
145d74716c
commit
3eeb03d1f9
|
@ -602,7 +602,14 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
|
|||
if len(split) < 2 {
|
||||
return errors.Errorf("invalid log option %q", o)
|
||||
}
|
||||
logOpts[split[0]] = split[1]
|
||||
switch {
|
||||
case split[0] == "driver":
|
||||
s.LogConfiguration.Driver = split[1]
|
||||
case split[0] == "path":
|
||||
s.LogConfiguration.Path = split[1]
|
||||
default:
|
||||
logOpts[split[0]] = split[1]
|
||||
}
|
||||
}
|
||||
s.LogConfiguration.Options = logOpts
|
||||
s.Name = c.Name
|
||||
|
|
|
@ -469,7 +469,6 @@ var _ = Describe("Podman run", func() {
|
|||
})
|
||||
|
||||
It("podman run log-opt", func() {
|
||||
Skip(v2fail)
|
||||
log := filepath.Join(podmanTest.TempDir, "/container.log")
|
||||
session := podmanTest.Podman([]string{"run", "--rm", "--log-opt", fmt.Sprintf("path=%s", log), ALPINE, "ls"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
Loading…
Reference in New Issue