[Fix] Stability
This commit is contained in:
parent
e1dd86ec02
commit
8160f8d0cb
44 changed files with 796 additions and 1296 deletions
|
|
@ -15,6 +15,7 @@ pub const COMMANDS: &[&str] = &[
|
|||
"config get",
|
||||
"config set ",
|
||||
"config reload",
|
||||
"health",
|
||||
"components",
|
||||
"logs",
|
||||
"update check",
|
||||
|
|
@ -84,6 +85,7 @@ pub fn parse(line: &str) -> Option<LocalRequest> {
|
|||
}),
|
||||
["config", "reload"] => Some(LocalRequest::ReloadConfig),
|
||||
["omikron", "status"] => Some(LocalRequest::GetOmikronStatus),
|
||||
["health"] => Some(LocalRequest::ListComponents),
|
||||
["components"] => Some(LocalRequest::ListComponents),
|
||||
["logs"] => Some(LocalRequest::GetLogs { limit: 100 }),
|
||||
["update", "check"] => Some(LocalRequest::CheckUpdate),
|
||||
|
|
@ -229,6 +231,14 @@ mod tests {
|
|||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_health() {
|
||||
assert!(matches!(
|
||||
parse("health"),
|
||||
Some(LocalRequest::ListComponents)
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_users_show() {
|
||||
let req = parse("users show 42").unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue