This repository has no description
855 B
26 lines
1use knot_bench::{RepoCount, build_registry};
2use knot_index::Resolved;
3
4#[test]
5fn the_registry_fixture_boots_without_folding_collaborators() {
6 let registry = build_registry(RepoCount::new(8));
7 let index = registry.index();
8 index.rebuild().unwrap();
9
10 registry.dids().iter().for_each(|repo| {
11 assert_eq!(
12 index.is_collaborator(repo, &knot_types::AccountDid::new("did:plc:nel").unwrap()),
13 Resolved::Warming,
14 "rebuild must not fold any collaborator COB, so every repo reads warming until first access"
15 );
16 });
17
18 let first = ®istry.dids()[0];
19 index.ensure_collaborators(first).unwrap();
20 assert!(
21 !index
22 .is_collaborator(first, &knot_types::AccountDid::new("did:plc:nel").unwrap())
23 .is_warming(),
24 "repo folds on first access"
25 );
26}