diff options
Diffstat (limited to 'tests/staleness.rs')
| -rw-r--r-- | tests/staleness.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/staleness.rs b/tests/staleness.rs index c99c666..bebceb4 100644 --- a/tests/staleness.rs +++ b/tests/staleness.rs @@ -90,7 +90,7 @@ fn a_missing_dependency_blocks_the_build_and_names_the_blocker_everywhere() { assert!(matches!(out, pipeline::Outcome::Blocked { .. }), "{out:?}"); let b = builds::get(&env.db, &id).unwrap().unwrap(); - assert_eq!(b.state, build_state::BLOCKED_MISSING_DEP); + assert_eq!(b.state, BuildState::BlockedMissingDep); let blocked_on: Vec<String> = serde_json::from_str(&b.blocked_on_json).unwrap(); assert_eq!(blocked_on, vec!["dep-partner".to_string()]); // Blocked is not failed: nothing went wrong with the build itself. @@ -111,12 +111,12 @@ fn a_blocked_build_waits_and_is_requeued_only_when_the_blocker_arrives() { let id = pipeline::enqueue_for_candidate(&env.cfg, &env.db, &c).unwrap(); let _ = fx; pipeline::run(&env.cfg, &env.db, &id).unwrap(); - assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, build_state::BLOCKED_MISSING_DEP); + assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, BuildState::BlockedMissingDep); // The dispatcher sweeps blocked builds every pass. Requeueing one that will // immediately block again is a busy loop, so it must stay put. assert_eq!(builds::requeue_blocked(&env.db).unwrap(), 0, "requeued while still blocked"); - assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, build_state::BLOCKED_MISSING_DEP); + assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, BuildState::BlockedMissingDep); // Publishing dep-partner is what unblocks it. A build that was blocked and // can now run is not a new decision — a human already approved it (§10). @@ -128,12 +128,12 @@ fn a_blocked_build_waits_and_is_requeued_only_when_the_blocker_arrives() { ); // Publishing the blocker requeues what was waiting on it — the publish path // sweeps blocked builds itself, so an explicit call afterwards is a no-op. - assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, build_state::QUEUED, "the blocker arrived and the build stayed blocked"); + assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, BuildState::Queued, "the blocker arrived and the build stayed blocked"); assert_eq!(builds::requeue_blocked(&env.db).unwrap(), 0, "nothing left to requeue"); // And it now runs to completion. pipeline::run(&env.cfg, &env.db, &id).unwrap(); - assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, build_state::SUCCEEDED); + assert_eq!(builds::get(&env.db, &id).unwrap().unwrap().state, BuildState::Succeeded); assert!(aur_build::db::index_version(&env.db, "missing-dep").unwrap().is_some()); } |
