Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

fixes at-microcosm/links#24 updated assertions and make check passes all tests

Changed files
+18
constellation
src
storage
+18
constellation/src/storage/mod.rs
···
version: (0, 0),
items: vec![],
next: None,
+
total: 0,
}
);
assert_eq!(
···
version: (0, 0),
items: vec![],
next: None,
+
total: 0,
}
);
assert_eq!(storage.get_all_counts("bad-example.com")?, HashMap::new());
···
rkey: "asdf".into(),
}],
next: None,
+
total: 1,
}
);
assert_eq!(
···
version: (1, 0),
items: vec!["did:plc:asdf".into()],
next: None,
+
total: 1,
}
);
assert_stats(storage.get_stats()?, 1..=1, 1..=1, 1..=1);
···
},
],
next: Some(3),
+
total: 5,
}
);
assert_eq!(
···
version: (5, 0),
items: vec!["did:plc:asdf-5".into(), "did:plc:asdf-4".into()],
next: Some(3),
+
total: 5,
}
);
let links = storage.get_links("a.com", "app.t.c", ".abc.uri", 2, links.next)?;
···
},
],
next: Some(1),
+
total: 5,
}
);
assert_eq!(
···
version: (5, 0),
items: vec!["did:plc:asdf-3".into(), "did:plc:asdf-2".into()],
next: Some(1),
+
total: 5,
}
);
let links = storage.get_links("a.com", "app.t.c", ".abc.uri", 2, links.next)?;
···
rkey: "asdf".into(),
},],
next: None,
+
total: 5,
}
);
assert_eq!(
···
version: (5, 0),
items: vec!["did:plc:asdf-1".into()],
next: None,
+
total: 5,
}
);
assert_stats(storage.get_stats()?, 5..=5, 1..=1, 5..=5);
···
},
],
next: Some(2),
+
total: 4,
}
);
let links = storage.get_links("a.com", "app.t.c", ".abc.uri", 2, links.next)?;
···
},
],
next: None,
+
total: 4,
}
);
assert_stats(storage.get_stats()?, 4..=4, 1..=1, 4..=4);
···
},
],
next: Some(2),
+
total: 4,
}
);
storage.push(
···
},
],
next: None,
+
total: 5,
}
);
assert_stats(storage.get_stats()?, 5..=5, 1..=1, 5..=5);
···
},
],
next: Some(2),
+
total: 4,
}
);
storage.push(
···
rkey: "asdf".into(),
},],
next: None,
+
total: 3,
}
);
assert_stats(storage.get_stats()?, 4..=4, 1..=1, 3..=3);
···
},
],
next: Some(2),
+
total: 4,
}
);
storage.push(
···
rkey: "asdf".into(),
},],
next: None,
+
total: 4,
);
assert_stats(storage.get_stats()?, 4..=4, 1..=1, 4..=4);