summaryrefslogtreecommitdiffstats
path: root/tests/failure_modes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/failure_modes.rs')
-rw-r--r--tests/failure_modes.rs19
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/failure_modes.rs b/tests/failure_modes.rs
index 4e7446a..cc5cd44 100644
--- a/tests/failure_modes.rs
+++ b/tests/failure_modes.rs
@@ -55,12 +55,8 @@ impl Sandbox for FakeSandbox {
}
fn run(&self, cmd: &aur_build::sandbox::Cmd, on_log: &mut dyn FnMut(&[u8])) -> Result<Exit> {
match self.fault {
- Fault::DieMidRun if Self::is_build(cmd) => {
- Err(Error::other("sandbox vanished mid-run (connection reset)"))
- }
- Fault::TtlMidBuild if Self::is_build(cmd) => {
- Err(Error::other("sandbox ttl expired during build"))
- }
+ Fault::DieMidRun if Self::is_build(cmd) => Err(Error::other("sandbox vanished mid-run (connection reset)")),
+ Fault::TtlMidBuild if Self::is_build(cmd) => Err(Error::other("sandbox ttl expired during build")),
Fault::EmptyWorld if Self::is_query(cmd) => {
Ok(Exit { code: Some(0), stdout: Vec::new(), stderr: Vec::new() })
}
@@ -113,10 +109,7 @@ fn a_sandbox_that_dies_mid_run_expires_its_lease_and_the_requeue_finishes_the_bu
);
assert_eq!(builds::reap_expired(&env.db).unwrap(), 1);
- assert!(matches!(
- pipeline::run(&env.cfg, &env.db, &id).unwrap(),
- pipeline::Outcome::Succeeded { .. }
- ));
+ assert!(matches!(pipeline::run(&env.cfg, &env.db, &id).unwrap(), pipeline::Outcome::Succeeded { .. }));
assert_eq!(db::index_version(&env.db, "plain-make").unwrap().as_deref(), Some("1.0-1"));
}
@@ -151,11 +144,7 @@ fn a_full_pool_blocks_the_build_instead_of_breaking_it() {
BuildState::BlockedMissingDep,
"the build waits for capacity on the same blocked machinery it uses for missing deps, unharmed"
);
- assert_eq!(
- b.blocked_on_json.as_str(),
- r#"["sandbox-pool"]"#,
- "the block names what it waits on"
- );
+ assert_eq!(b.blocked_on_json.as_str(), r#"["sandbox-pool"]"#, "the block names what it waits on");
}
#[test]