diff options
Diffstat (limited to 'tests/crash.rs')
| -rw-r--r-- | tests/crash.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/crash.rs b/tests/crash.rs index 1e72177..94469b8 100644 --- a/tests/crash.rs +++ b/tests/crash.rs @@ -68,10 +68,7 @@ fn a_process_killed_mid_step_resumes_from_its_checkpoints_with_no_duplicate_work env.exec("UPDATE build SET lease_expires_at='2000-01-01T00:00:00Z' WHERE id=?1", ¶ms(vec![id.as_str()])); assert_eq!(builds::reap_expired(&env.db).unwrap(), 1); - assert_eq!( - builds::step_status(&env.db, &id, "build").unwrap(), - Some(StepState::Interrupted) - ); + assert_eq!(builds::step_status(&env.db, &id, "build").unwrap(), Some(StepState::Interrupted)); env.cfg.hooks.shim_kill_parent = None; env.cfg.save().unwrap(); @@ -91,7 +88,10 @@ fn a_process_killed_mid_step_resumes_from_its_checkpoints_with_no_duplicate_work ); assert_eq!(aur_build::shims::called_with(&shim, "repo-add", ""), 1, "publish must happen once"); assert_eq!( - env.query_i64("SELECT count(*) FROM release WHERE pkgbase_id=(SELECT id FROM pkgbase WHERE name='plain-make')", &[]), + env.query_i64( + "SELECT count(*) FROM release WHERE pkgbase_id=(SELECT id FROM pkgbase WHERE name='plain-make')", + &[] + ), Some(1), "no duplicate release from the resume" ); @@ -137,7 +137,11 @@ fn a_failed_build_leaves_the_index_serving_the_old_version_and_says_so() { let web = Web::attach(env, fx); let attention = web.get("/attention"); - assert!(attention.body.contains("Approved but unbuilt"), "no Attention section: {}", &attention.body[..600.min(attention.body.len())]); + assert!( + attention.body.contains("Approved but unbuilt"), + "no Attention section: {}", + &attention.body[..600.min(attention.body.len())] + ); assert!(attention.body.contains("still serving 1.0-1"), "Attention does not say what is served"); let pkg = web.get("/packages/plain-make"); assert!(pkg.body.contains("build failed"), "the package page hides the failure"); |
