use crate::workdiff::{Attempt, Change, Churn, FileChurn};
pub(super) fn attempts() -> Vec<Attempt> {
let attempt = |id: &str, change| Attempt {
project: "p".to_owned(),
ball_id: id.into(),
handle: None,
delivered: None,
change,
};
vec![
attempt("bl-1", Change::Unreadable),
attempt(
"bl-2",
Change::Absent {
target: "main".into(),
source: "work/bl-2".into(),
missing: vec!["work/bl-2".into()],
},
),
attempt(
"bl-3",
Change::Diff {
target: "main".into(),
source: "work/bl-3".into(),
target_oid: "aaa".into(),
source_oid: "bbb".into(),
files: vec![
FileChurn {
path: "src/a.rs".into(),
churn: Churn::Text {
added: 3,
removed: 1,
},
},
FileChurn {
path: "assets/x.png".into(),
churn: Churn::Binary,
},
],
truncated: true,
},
),
Attempt {
project: "p".to_owned(),
ball_id: "bl-3".into(),
handle: Some("at-0badcafe".into()),
delivered: Some("ccc".into()),
change: Change::Diff {
target: "work/bl-3".into(),
source: "attempt/at-0badcafe".into(),
target_oid: "ccc".into(),
source_oid: "ddd".into(),
files: vec![],
truncated: false,
},
},
]
}