| 10196 | } |
| 10197 | |
| 10198 | fn self_push_commit(view: &str, state_b32: &str) -> ParsedCommit { |
| 10199 | ParsedCommit { |
| 10200 | git_sha: "aabbccdd11223344".to_string(), |
| 10201 | short_sha: "aabbccdd".to_string(), |
| 10202 | metadata: CommitMetadata { |
| 10203 | author_name: "Test".to_string(), |
| 10204 | author_email: None, |
| 10205 | author_name_raw: b"Test".to_vec(), |
| 10206 | author_email_raw: None, |
| 10207 | timestamp: Utc::now(), |
| 10208 | message: "feat: test".to_string(), |
| 10209 | description: None, |
| 10210 | author_time: 1_700_000_000, |
| 10211 | author_time_offset_seconds: 0, |
| 10212 | committer_name: "Test".to_string(), |
| 10213 | committer_email: None, |
| 10214 | committer_name_raw: b"Test".to_vec(), |
| 10215 | committer_email_raw: None, |
| 10216 | committer_time: 1_700_000_000, |
| 10217 | committer_time_offset_seconds: 0, |
| 10218 | }, |
| 10219 | files: Vec::new(), |
| 10220 | parent_index: None, |
| 10221 | parent_oids: Vec::new(), |
| 10222 | committer_time: 1_700_000_000, |
| 10223 | is_merge: false, |
| 10224 | is_empty: true, |
| 10225 | push_trailer: parse_push_trailer(&format!( |
| 10226 | "feat: test\n\nAtomic-View: {}\nAtomic-State: {}", |
| 10227 | view, state_b32 |
| 10228 | )), |
| 10229 | tree_oid: Oid::ZERO_SHA1, |
| 10230 | parent_tree_oid: None, |
| 10231 | raw_object: Vec::new(), |
| 10232 | } |
| 10233 | } |
| 10234 | |
| 10235 | #[test] |
| 10236 | fn test_should_skip_self_push() { |