Add live CLI progress for long-running jobs
This commit is contained in:
@@ -45,6 +45,19 @@ fn process_exit_codes_help_and_shared_state_roundtrip() {
|
||||
.success()
|
||||
);
|
||||
|
||||
let rebuilt = cli(&home, &["rebuild"]);
|
||||
assert!(rebuilt.status.success());
|
||||
assert!(String::from_utf8_lossy(&rebuilt.stdout).contains("%]"));
|
||||
|
||||
let rebuilt_json = cli(&home, &["--json", "rebuild", "--incremental"]);
|
||||
assert!(rebuilt_json.status.success());
|
||||
let rebuilt_json: serde_json::Value = serde_json::from_slice(&rebuilt_json.stdout).unwrap();
|
||||
assert!(
|
||||
rebuilt_json["progress"]
|
||||
.as_array()
|
||||
.is_some_and(|items| !items.is_empty())
|
||||
);
|
||||
|
||||
let created = Command::new(env!("CARGO_BIN_EXE_bds-cli"))
|
||||
.env("HOME", &home)
|
||||
.args(["--json", "post", "--stdin", "--no-translate"])
|
||||
|
||||
Reference in New Issue
Block a user