Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle: use repository fixture in cob stream tests
Fintan Halpenny committed 8 months ago
commit 0c6ff06c65cb6a9f6f6ac9c97d4a1ab04ecf9615
parent 1d7478cd909776b4423a90cd0bf40c10d711e989
1 file changed +5 -5
modified crates/radicle/src/cob/stream.rs
@@ -173,11 +173,11 @@ mod tests {
    use nonempty::NonEmpty;
    use serde_json as json;

-
    use crate::cob;
    use crate::cob::change::Storage as _;
    use crate::crypto::test::signer::MockSigner;
    use crate::test::arbitrary;
    use crate::test::arbitrary::gen;
+
    use crate::{cob, test};

    use super::*;

@@ -316,7 +316,7 @@ mod tests {
    #[test]
    fn test_all_from() {
        let tmp = tempfile::tempdir().unwrap();
-
        let repo = git2::Repository::init(tmp.path()).unwrap();
+
        let (repo, _) = test::fixtures::repository(tmp.path());
        let signer = MockSigner::default();
        let ops = gen_ops(&repo, &signer);
        let history = CobRange {
@@ -330,7 +330,7 @@ mod tests {
    #[test]
    fn test_all_until() {
        let tmp = tempfile::tempdir().unwrap();
-
        let repo = git2::Repository::init(tmp.path()).unwrap();
+
        let (repo, _) = test::fixtures::repository(tmp.path());
        let signer = MockSigner::default();
        let ops = gen_ops(&repo, &signer);
        let tip = ops.last().unwrap().id;
@@ -345,7 +345,7 @@ mod tests {
    #[test]
    fn test_all_from_until() {
        let tmp = tempfile::tempdir().unwrap();
-
        let repo = git2::Repository::init(tmp.path()).unwrap();
+
        let (repo, _) = test::fixtures::repository(tmp.path());
        let signer = MockSigner::default();
        let ops = gen_ops(&repo, &signer);
        let tip = ops.last().unwrap().id;
@@ -360,7 +360,7 @@ mod tests {
    #[test]
    fn test_from_until() {
        let tmp = tempfile::tempdir().unwrap();
-
        let repo = git2::Repository::init(tmp.path()).unwrap();
+
        let (repo, _) = test::fixtures::repository(tmp.path());
        let signer = MockSigner::default();
        let ops = gen_ops(&repo, &signer);
        let history = CobRange {