mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Support testing with newer version of Git
This commit is contained in:
parent
2253e52ab7
commit
82ba16db34
@ -267,6 +267,9 @@ def runner():
|
|||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def config_git():
|
def config_git():
|
||||||
"""Configure global git configuration, if missing"""
|
"""Configure global git configuration, if missing"""
|
||||||
|
os.system(
|
||||||
|
'git config init.defaultBranch || '
|
||||||
|
'git config --global init.defaultBranch master')
|
||||||
os.system(
|
os.system(
|
||||||
'git config user.name || '
|
'git config user.name || '
|
||||||
'git config --global user.name "test"')
|
'git config --global user.name "test"')
|
||||||
|
@ -56,6 +56,8 @@ def test_init(
|
|||||||
args.append('-f')
|
args.append('-f')
|
||||||
|
|
||||||
# run init
|
# run init
|
||||||
|
runner(['git', 'config', '--global', 'init.defaultBranch', 'master'],
|
||||||
|
env={'HOME': home}, cwd=cwd)
|
||||||
run = runner(yadm_cmd(*args), env={'HOME': home}, cwd=cwd)
|
run = runner(yadm_cmd(*args), env={'HOME': home}, cwd=cwd)
|
||||||
|
|
||||||
if repo_present and not force:
|
if repo_present and not force:
|
||||||
|
@ -22,6 +22,10 @@ def test_upgrade(tmpdir, runner, versions, submodule):
|
|||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
home = tmpdir.mkdir('HOME')
|
home = tmpdir.mkdir('HOME')
|
||||||
env = {'HOME': str(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:
|
if submodule:
|
||||||
ext_repo = tmpdir.mkdir('ext_repo')
|
ext_repo = tmpdir.mkdir('ext_repo')
|
||||||
|
Loading…
Reference in New Issue
Block a user