diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-04-29 20:26:25 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-04-29 20:26:25 +0200 |
commit | 97426387ce06a3c9622a919fea0b3d7b04c68e72 (patch) | |
tree | 4eff972f7191eef6b417258fd3a0657684dff8fa /tests | |
parent | d60ac28946bc30c36610d17067400af286625d9f (diff) |
Add required user config for tests into the tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server_shell.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/server_shell.rs b/tests/server_shell.rs index bee0ed7..22f3d3b 100644 --- a/tests/server_shell.rs +++ b/tests/server_shell.rs @@ -203,6 +203,22 @@ fn push_git_repo(c: &TestContext, repo_name: &str) -> Assert { fn commit_dummy_content(c: &TestContext, repo_name: &str) -> Result<()> { let repo_dir = c.workdir.as_ref().join(repo_name); + Command::new("git") + .args(["config", "user.email", "shukkie@example.com"]) + .current_dir(&repo_dir) + .assert() + .success(); + Command::new("git") + .args(["config", "user.name", "Shukkie"]) + .current_dir(&repo_dir) + .assert() + .success(); + Command::new("git") + .args(["checkout", "-b", "main"]) + .current_dir(&repo_dir) + .assert() + .success(); + let file_name = "yay-a-file"; let file_path = repo_dir.join(file_name); fs::write(&file_path, "doesn't matter what this is")?; |