vcs-testkit
Test fixtures for git/jj automation: throwaway repositories for integration tests.
📖 Full guide: on docs.rs — every fixture with examples, plus the Testing & mocking guide.
TempDir— a unique, self-cleaning temp directory (pid + counter, no temp-dir dependency).GitSandbox— a configured git repo on branchmain(deterministic identity, signing off,autocrlf=false) with scenario helpers:commit_file,branch,checkout,rev_parse, and a rawgit(&[…])escape hatch.BareRemote— a populated bare repository to clone/fetch/push against locally (no network).JjSandbox— a jj (git-backed) workspace with repo-scoped identity:describe,new_change,bookmark, rawjj(&[…]).configure_identity— just the deterministic config, for tests whose subject is repository initialisation itself.
Everything is synchronous (std::process) and panics on failure — these
are fixtures; a broken fixture should fail the test loudly at the call site.
The real git / jj binaries must be on PATH, so gate tests behind
#[ignore = "requires the git binary"] to keep hermetic CI green.
use ;
let repo = init;
repo.commit_file;
repo.branch;
let remote = seeded;
repo.git;
Part of vcs-toolkit-rs; used as a
dev-dependency by the vcs-git / vcs-jj / vcs-core test suites and by
downstream consumers' integration tests. Depends on nothing (std only).