diff options
Diffstat (limited to 'tests/cli_test_utils')
-rw-r--r-- | tests/cli_test_utils/git.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cli_test_utils/git.rs b/tests/cli_test_utils/git.rs index 150af45..fe6e1bd 100644 --- a/tests/cli_test_utils/git.rs +++ b/tests/cli_test_utils/git.rs @@ -46,6 +46,15 @@ pub fn create_commit(repo_dir: &Path) -> Result<String> { Ok(commit_hash) } +pub fn push(local_repo_dir: &Path, branch: &str) { + Command::new("git") + .args(["push", "origin", branch]) + .current_dir(&local_repo_dir) + .timeout(std::time::Duration::from_secs(3)) + .assert() + .success(); +} + pub fn verify_repo_exists(repo_dir: &Path) { Command::new("git") .arg("rev-list") |