gitweb: tests: functional: Fix test failure if initial default branch is not master

Closes #2101.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Veiko Aasa 2021-09-17 21:42:13 +03:00 committed by Sunil Mohan Adapa
parent 00be64036a
commit c5c1f5594d
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -301,8 +301,9 @@ def _repo_is_writable(repo, with_auth=False):
with _gitweb_temp_directory() as temp_directory:
repo_directory = os.path.join(temp_directory, 'test-project')
_create_local_repo(repo_directory)
git_push_command = ['git', 'push', '-qf', url, 'master']
git_push_command = [
'git', '-c', 'push.default=current', 'push', '-qf', url
]
return _gitweb_git_command_is_successful(git_push_command,
repo_directory)