Skip to content

Commit

Permalink
improve error report
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog-crabnebula committed Nov 19, 2023
1 parent dfebd8a commit cbd9a76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
sudo apt-get install -y fuse libfuse2
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --test '*' -- --ignored
- run: cargo test --test '*' -- --ignored --nocapture
20 changes: 13 additions & 7 deletions crates/updater/tests/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,21 @@ fn update_app() {
let mut counter = 0;
loop {
std::thread::sleep(std::time::Duration::from_secs(2));
if let Ok(o) = binary_cmd
.output()
.map(|o| String::from_utf8_lossy(&o.stdout).to_string())
{
let version = o.split_once('\n').unwrap().0;
if version == "1.0.0" {
break;
match binary_cmd.output() {
Ok(o) => {
let output = String::from_utf8_lossy(&o.stdout).to_string();
let version = output.split_once('\n').unwrap().0;
if version == "1.0.0" {
break;
}
println!("unexpected output {output}");
eprintln!("stderr: {}", String::from_utf8_lossy(&o.stderr));
}
Err(e) => {
eprintln!("failed to check if app was updated: {e}");
}
}

counter += 1;
if counter == 10 {
panic!("updater test timedout and couldn't verify the update has happened")
Expand Down

0 comments on commit cbd9a76

Please sign in to comment.