huskies: merge 1010
This commit is contained in:
@@ -52,7 +52,10 @@ fn happy_path_backlog_through_archived() {
|
||||
|
||||
#[test]
|
||||
fn happy_path_with_qa() {
|
||||
let s = Stage::Coding { claim: None };
|
||||
let s = Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
};
|
||||
let s = transition(s, PipelineEvent::GatesStarted).unwrap();
|
||||
assert!(matches!(s, Stage::Qa));
|
||||
|
||||
@@ -69,7 +72,10 @@ fn happy_path_with_qa() {
|
||||
|
||||
#[test]
|
||||
fn qa_retry_loop() {
|
||||
let s = Stage::Coding { claim: None };
|
||||
let s = Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
};
|
||||
let s = transition(s, PipelineEvent::GatesStarted).unwrap();
|
||||
assert!(matches!(s, Stage::Qa));
|
||||
|
||||
@@ -154,7 +160,13 @@ fn cannot_start_gates_from_backlog() {
|
||||
|
||||
#[test]
|
||||
fn cannot_accept_from_coding() {
|
||||
let result = transition(Stage::Coding { claim: None }, PipelineEvent::Accepted);
|
||||
let result = transition(
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
PipelineEvent::Accepted,
|
||||
);
|
||||
assert!(matches!(
|
||||
result,
|
||||
Err(TransitionError::InvalidTransition { .. })
|
||||
@@ -165,7 +177,14 @@ fn cannot_accept_from_coding() {
|
||||
|
||||
#[test]
|
||||
fn block_from_any_active_stage() {
|
||||
for s in [Stage::Backlog, Stage::Coding { claim: None }, Stage::Qa] {
|
||||
for s in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
] {
|
||||
let result = transition(
|
||||
s.clone(),
|
||||
PipelineEvent::Block {
|
||||
@@ -252,7 +271,10 @@ fn legacy_unblock_archived_blocked_returns_to_backlog() {
|
||||
fn abandon_from_any_active_or_done() {
|
||||
for s in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding { claim: None },
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
Stage::Done {
|
||||
merged_at: chrono::Utc::now(),
|
||||
@@ -268,7 +290,10 @@ fn abandon_from_any_active_or_done() {
|
||||
fn supersede_from_any_active_or_done() {
|
||||
for s in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding { claim: None },
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
Stage::Done {
|
||||
merged_at: chrono::Utc::now(),
|
||||
@@ -292,7 +317,14 @@ fn review_hold_from_active_stages() {
|
||||
// Story 945: `ReviewHold` transitions to `Stage::ReviewHold { resume_to }`
|
||||
// with the resume_to set to the originating stage, replacing the legacy
|
||||
// boolean flag.
|
||||
for s in [Stage::Backlog, Stage::Coding { claim: None }, Stage::Qa] {
|
||||
for s in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
] {
|
||||
let result = transition(
|
||||
s.clone(),
|
||||
PipelineEvent::ReviewHold {
|
||||
@@ -338,7 +370,10 @@ fn merge_failed_final() {
|
||||
#[test]
|
||||
fn merge_failed_only_from_merge() {
|
||||
let result = transition(
|
||||
Stage::Coding { claim: None },
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
PipelineEvent::MergeFailedFinal {
|
||||
reason: "conflicts".into(),
|
||||
},
|
||||
@@ -483,7 +518,14 @@ fn cannot_deps_met_from_upcoming() {
|
||||
|
||||
#[test]
|
||||
fn reject_from_active_stages() {
|
||||
for s in [Stage::Backlog, Stage::Coding { claim: None }, Stage::Qa] {
|
||||
for s in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
] {
|
||||
let result = transition(
|
||||
s.clone(),
|
||||
PipelineEvent::Reject {
|
||||
@@ -989,7 +1031,10 @@ fn hotfix_requested_from_done_lands_in_coding() {
|
||||
fn hotfix_requested_rejected_from_non_done_stages() {
|
||||
for stage in [
|
||||
Stage::Backlog,
|
||||
Stage::Coding { claim: None },
|
||||
Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
Stage::Qa,
|
||||
Stage::Merge {
|
||||
feature_branch: fb("feature/story-1"),
|
||||
@@ -1016,7 +1061,10 @@ fn audit_entry_backlog_to_coding_exact_format() {
|
||||
let fired = TransitionFired {
|
||||
story_id: StoryId("1014_my_story".into()),
|
||||
before: Stage::Backlog,
|
||||
after: Stage::Coding { claim: None },
|
||||
after: Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
event: PipelineEvent::DepsMet,
|
||||
at,
|
||||
};
|
||||
@@ -1116,7 +1164,10 @@ fn audit_entry_done_to_archived() {
|
||||
fn audit_entry_coding_to_blocked() {
|
||||
let fired = TransitionFired {
|
||||
story_id: StoryId("300_s".into()),
|
||||
before: Stage::Coding { claim: None },
|
||||
before: Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
after: Stage::Blocked {
|
||||
reason: "waiting".into(),
|
||||
},
|
||||
@@ -1138,7 +1189,10 @@ fn audit_entry_blocked_to_coding() {
|
||||
before: Stage::Blocked {
|
||||
reason: "test".into(),
|
||||
},
|
||||
after: Stage::Coding { claim: None },
|
||||
after: Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
event: PipelineEvent::Unblock,
|
||||
at: chrono::Utc::now(),
|
||||
};
|
||||
@@ -1177,9 +1231,15 @@ fn audit_entry_merge_to_merge_failure() {
|
||||
fn audit_entry_coding_to_frozen() {
|
||||
let fired = TransitionFired {
|
||||
story_id: StoryId("600_s".into()),
|
||||
before: Stage::Coding { claim: None },
|
||||
before: Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
after: Stage::Frozen {
|
||||
resume_to: Box::new(Stage::Coding { claim: None }),
|
||||
resume_to: Box::new(Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
}),
|
||||
},
|
||||
event: PipelineEvent::Freeze,
|
||||
at: chrono::Utc::now(),
|
||||
@@ -1194,7 +1254,10 @@ fn audit_entry_coding_to_frozen() {
|
||||
fn audit_entry_coding_to_abandoned() {
|
||||
let fired = TransitionFired {
|
||||
story_id: StoryId("700_s".into()),
|
||||
before: Stage::Coding { claim: None },
|
||||
before: Stage::Coding {
|
||||
claim: None,
|
||||
plan: PlanState::Missing,
|
||||
},
|
||||
after: Stage::Abandoned {
|
||||
ts: chrono::Utc::now(),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user