Skip to content

Commit

Permalink
Merge pull request #53 from sbidoul/fix-ci
Browse files Browse the repository at this point in the history
Fix test errors related to git config
  • Loading branch information
sbidoul authored Oct 21, 2023
2 parents 8ff8603 + 8eab385 commit ce29b09
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_oca_git_push_if_remote_did_not_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
def repo_dir(tmp_path_factory) -> str:
repo_path = tmp_path_factory.mktemp("repo")
subprocess.check_call(["git", "init"], cwd=repo_path)
subprocess.check_call(
["git", "config", "user.email", "[email protected]"],
cwd=repo_path,
)
subprocess.check_call(
["git", "config", "user.name", "test"],
cwd=repo_path,
)
(repo_path / "README").touch()
subprocess.check_call(["git", "add", "."], cwd=repo_path)
subprocess.check_call(["git", "commit", "-m", "initial commit"], cwd=repo_path)
Expand All @@ -24,6 +32,14 @@ def git_clone_path(repo_dir: str, tmp_path) -> Path:
subprocess.check_call(
["git", "clone", "--depth=1", "file://" + repo_dir, str(clone_path)]
)
subprocess.check_call(
["git", "config", "user.email", "[email protected]"],
cwd=clone_path,
)
subprocess.check_call(
["git", "config", "user.name", "test"],
cwd=clone_path,
)
return clone_path


Expand Down

0 comments on commit ce29b09

Please sign in to comment.