summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 12:50:13 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-24 13:02:07 +0200
commit3eeb03d1f970478961acf21cecfdf90d5a75043f (patch)
tree7e6919aa323900be755bf8edf86095a775817413
parent145d74716c9cbc8d6c83be5a8f6a575543d10d06 (diff)
downloadpodman-3eeb03d1f970478961acf21cecfdf90d5a75043f.tar.gz
podman-3eeb03d1f970478961acf21cecfdf90d5a75043f.tar.bz2
podman-3eeb03d1f970478961acf21cecfdf90d5a75043f.zip
podman: fix --log-opt=path=%s
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--cmd/podman/common/specgen.go9
-rw-r--r--test/e2e/run_test.go1
2 files changed, 8 insertions, 2 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 9e8a271ae..abec1213c 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -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
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 7745bcf6a..7d4039819 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -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()