mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
Merge pull request #7449 from openSUSE/log-level
Fix log level case regression
This commit is contained in:
@ -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
|
||||
}
|
||||
|
@ -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))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user