diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-07-17 20:03:37 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-07-17 20:03:37 +0200 |
commit | 3ed958e4fafe3e1d0b1dea1a8cf1a8c601cad2c0 (patch) | |
tree | ee139fe8d70359bd0305cec3efd26819f357f42d /tests | |
parent | 8c3ba39c977565e8b6215b5cb86987e9d3ffefff (diff) |
Add test user config for the test
Note that this isn't set globally, just for the test repo.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cli_test_utils/git.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/cli_test_utils/git.rs b/tests/cli_test_utils/git.rs index a2acd59..99177e8 100644 --- a/tests/cli_test_utils/git.rs +++ b/tests/cli_test_utils/git.rs @@ -19,6 +19,17 @@ pub fn create_clone(c: &TestContext, repo_dir: &Path, relative_name: &str) -> Pa } pub fn create_commit(repo_dir: &Path) -> Result<String> { + Command::new("git") + .args(["config", "user.email", "shukkie@example.com"]) + .current_dir(&repo_dir) + .assert() + .success(); + Command::new("git") + .args(["config", "user.name", "Shackle Test User"]) + .current_dir(&repo_dir) + .assert() + .success(); + let test_file_name = repo_dir.join("some_file"); fs::write(test_file_name, "Some content or something")?; Command::new("git") |