aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/podman/root.go2
-rw-r--r--test/e2e/run_test.go12
2 files changed, 13 insertions, 1 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 8f77e5893..749a5fbe7 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -226,7 +226,7 @@ func persistentPostRunE(cmd *cobra.Command, args []string) error {
func loggingHook() {
var found bool
for _, l := range logLevels {
- if l == logLevel {
+ if l == strings.ToLower(logLevel) {
found = true
break
}
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 157b7d3d7..91b0d3e48 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -1204,4 +1204,16 @@ WORKDIR /madethis`
// nonprintables seem to work their way in.
Expect(session.OutputToString()).To(Not(ContainSubstring("/bin/sh")))
})
+
+ It("podman run a container with log-level (lower case)", func() {
+ session := podmanTest.Podman([]string{"--log-level=info", "run", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman run a container with log-level (upper case)", func() {
+ session := podmanTest.Podman([]string{"--log-level=INFO", "run", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})