diff --git a/crates/radicle-node/src/test/node.rs b/crates/radicle-node/src/test/node.rs index 8cc216d2..dacc988c 100644 --- a/crates/radicle-node/src/test/node.rs +++ b/crates/radicle-node/src/test/node.rs @@ -365,8 +365,8 @@ impl + cyphernet::Ecdh> NodeHandle { *issues.create(title, desc, &[], &[], []).unwrap().id() } - /// Perform a commit to `refname` by generating a blob of random data to a - /// random path in a new tree. + /// Perform a commit to `refname`, within the node's namespace, by + /// generating a blob of random data to a random path in a new tree. /// /// If the reference does not exist, a new one will be created with the new /// commit as its target. @@ -378,7 +378,12 @@ impl + cyphernet::Ecdh> NodeHandle { pub fn commit_to(&self, rid: RepoId, refname: impl AsRef) { use radicle::test::arbitrary; - let refname = refname.as_ref(); + let refname = match git::fmt::Qualified::from_refstr(refname.as_ref()) { + None => git::fmt::lit::refs_heads(refname).into(), + Some(refname) => refname, + }; + let refname = refname.with_namespace(self.id.to_component()); + let repo = self.storage.repository(rid).unwrap(); let raw = &repo.backend;