Support testing with newer version of Git

develop
Tim Byrne 10 months ago
parent 2253e52ab7
commit 82ba16db34
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12

@ -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…
Cancel
Save