Support testing with newer version of Git
This commit is contained in:
parent
2253e52ab7
commit
82ba16db34
3 changed files with 9 additions and 0 deletions
|
@ -267,6 +267,9 @@ def runner():
|
|||
@pytest.fixture(scope='session')
|
||||
def config_git():
|
||||
"""Configure global git configuration, if missing"""
|
||||
os.system(
|
||||
'git config init.defaultBranch || '
|
||||
'git config --global init.defaultBranch master')
|
||||
os.system(
|
||||
'git config user.name || '
|
||||
'git config --global user.name "test"')
|
||||
|
|
|
@ -56,6 +56,8 @@ def test_init(
|
|||
args.append('-f')
|
||||
|
||||
# run init
|
||||
runner(['git', 'config', '--global', 'init.defaultBranch', 'master'],
|
||||
env={'HOME': home}, cwd=cwd)
|
||||
run = runner(yadm_cmd(*args), env={'HOME': home}, cwd=cwd)
|
||||
|
||||
if repo_present and not force:
|
||||
|
|
|
@ -22,6 +22,10 @@ def test_upgrade(tmpdir, runner, versions, submodule):
|
|||
# pylint: disable=too-many-statements
|
||||
home = tmpdir.mkdir('HOME')
|
||||
env = {'HOME': str(home)}
|
||||
runner(['git', 'config', '--global', 'init.defaultBranch', 'master'],
|
||||
env=env)
|
||||
runner(['git', 'config', '--global', 'protocol.file.allow', 'always'],
|
||||
env=env)
|
||||
|
||||
if submodule:
|
||||
ext_repo = tmpdir.mkdir('ext_repo')
|
||||
|
|
Loading…
Reference in a new issue