test: improve commit and submodule testing

Two of the tests in radicle-git-ext and radicle-surf relied on using
the Git repository itself. This can end up being an issue when
sandboxing is involved.

This improves the situation by being able to generate commit data to
add to a temporary repository.

It also adds a helper for creating a local, temporary submodule for
testing the submodule interactions in the radicle-surf API.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2024-03-13 14:22:10 +00:00
parent f4a958010c
commit b4ca7f31db
15 changed files with 474 additions and 90 deletions
+1
View File
@@ -11,6 +11,7 @@ use std::{
use tempfile::{tempdir, TempDir};
#[derive(Debug)]
pub struct WithTmpDir<A> {
_tmp: TempDir,
inner: A,