Skip to content

Commit

Permalink
test: Test lower-case logger level
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
  • Loading branch information
Jonathan Woollett-Light committed Nov 15, 2023
1 parent 8d38270 commit 3bace34
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/vmm/src/logger/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,21 @@ mod tests {
assert_eq!(LevelFilter::from_str("Warn"), Ok(LevelFilter::Warn));
assert_eq!(LevelFilter::from_str("Error"), Ok(LevelFilter::Error));

assert_eq!(LevelFilter::from_str("off"), Ok(LevelFilter::Off));
assert_eq!(LevelFilter::from_str("trace"), Ok(LevelFilter::Trace));
assert_eq!(LevelFilter::from_str("debug"), Ok(LevelFilter::Debug));
assert_eq!(LevelFilter::from_str("info"), Ok(LevelFilter::Info));
assert_eq!(LevelFilter::from_str("warn"), Ok(LevelFilter::Warn));
assert_eq!(LevelFilter::from_str("error"), Ok(LevelFilter::Error));

assert_eq!(LevelFilter::from_str("OFF"), Ok(LevelFilter::Off));
assert_eq!(LevelFilter::from_str("TRACE"), Ok(LevelFilter::Trace));
assert_eq!(LevelFilter::from_str("DEBUG"), Ok(LevelFilter::Debug));
assert_eq!(LevelFilter::from_str("INFO"), Ok(LevelFilter::Info));
assert_eq!(LevelFilter::from_str("WARN"), Ok(LevelFilter::Warn));
assert_eq!(LevelFilter::from_str("ERROR"), Ok(LevelFilter::Error));

assert_eq!(LevelFilter::from_str("warning"), Ok(LevelFilter::Warn));
assert_eq!(LevelFilter::from_str("Warning"), Ok(LevelFilter::Warn));
assert_eq!(LevelFilter::from_str("WARNING"), Ok(LevelFilter::Warn));
}
Expand Down

0 comments on commit 3bace34

Please sign in to comment.