From c5c1f5594d356b6e2b209f9628576d68c0b4ff17 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Fri, 17 Sep 2021 21:42:13 +0300 Subject: [PATCH] gitweb: tests: functional: Fix test failure if initial default branch is not master Closes #2101. Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/modules/gitweb/tests/test_functional.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plinth/modules/gitweb/tests/test_functional.py b/plinth/modules/gitweb/tests/test_functional.py index 207f4aa4c..16fdfe43d 100644 --- a/plinth/modules/gitweb/tests/test_functional.py +++ b/plinth/modules/gitweb/tests/test_functional.py @@ -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)