mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Compare only snapshot's essential state in random collaboration test
This commit is contained in:
parent
6a07d39d61
commit
3f6feb1c12
2 changed files with 15 additions and 5 deletions
|
@ -88,7 +88,7 @@ pub struct RemoteWorktree {
|
|||
pending_updates: VecDeque<proto::UpdateWorktree>,
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq)]
|
||||
#[derive(Clone)]
|
||||
pub struct Snapshot {
|
||||
id: WorktreeId,
|
||||
root_name: String,
|
||||
|
@ -1668,7 +1668,7 @@ impl sum_tree::Summary for EntrySummary {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
#[derive(Clone, Debug)]
|
||||
struct PathEntry {
|
||||
id: usize,
|
||||
path: Arc<Path>,
|
||||
|
|
|
@ -3682,11 +3682,21 @@ mod tests {
|
|||
"guest {} has different worktrees than the host",
|
||||
ix
|
||||
);
|
||||
for (id, snapshot) in &host_worktree_snapshots {
|
||||
for (id, host_snapshot) in &host_worktree_snapshots {
|
||||
let guest_snapshot = &worktree_snapshots[id];
|
||||
assert_eq!(
|
||||
worktree_snapshots[id], *snapshot,
|
||||
guest_snapshot.root_name(),
|
||||
host_snapshot.root_name(),
|
||||
"guest {} has different root name than the host for worktree {}",
|
||||
ix,
|
||||
id
|
||||
);
|
||||
assert_eq!(
|
||||
guest_snapshot.entries(false).collect::<Vec<_>>(),
|
||||
host_snapshot.entries(false).collect::<Vec<_>>(),
|
||||
"guest {} has different snapshot than the host for worktree {}",
|
||||
ix, id
|
||||
ix,
|
||||
id
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue