A time before time

This commit is contained in:
Caleb Owens 2024-09-12 12:46:36 +02:00
parent aeea013ba0
commit 1389b9e465
No known key found for this signature in database

View File

@ -478,10 +478,7 @@ fn compute_resolutions(
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use std::{ use std::fs;
fs,
time::{SystemTime, UNIX_EPOCH},
};
use gitbutler_branch::BranchOwnershipClaims; use gitbutler_branch::BranchOwnershipClaims;
use tempfile::tempdir; use tempfile::tempdir;
@ -518,11 +515,6 @@ mod test {
} }
fn make_branch(head: git2::Oid, tree: git2::Oid) -> Branch { fn make_branch(head: git2::Oid, tree: git2::Oid) -> Branch {
let now = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis();
Branch { Branch {
id: Uuid::new_v4().into(), id: Uuid::new_v4().into(),
name: "branchy branch".into(), name: "branchy branch".into(),
@ -530,8 +522,8 @@ mod test {
source_refname: None, source_refname: None,
upstream: None, upstream: None,
upstream_head: None, upstream_head: None,
created_timestamp_ms: now, created_timestamp_ms: 69420,
updated_timestamp_ms: now, updated_timestamp_ms: 69420,
tree, tree,
head, head,
ownership: BranchOwnershipClaims::default(), ownership: BranchOwnershipClaims::default(),