From dc4e8b2fb72e90fc085960345aa07879ae644af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 19 Jan 2024 14:11:37 +0100 Subject: [PATCH] Fix scm tests to not use user configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you configure default branch name in new repos to anything else than master, there will be failures in tests. The test expects the branch to be called master, but does not ensure it in any way. Signed-off-by: Lubomír Sedlář (cherry picked from commit c8d16e69786a2d8225923dd76eac8516a149f392) --- tests/test_scm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_scm.py b/tests/test_scm.py index 65c13f3f..8814027e 100644 --- a/tests/test_scm.py +++ b/tests/test_scm.py @@ -317,6 +317,8 @@ class GitSCMTestCaseReal(SCMBaseTest): "git", "--git-dir=%s" % git_dir, "--work-tree=%s" % self.gitRepositoryLocation, + "-c", + "init.defaultBranch=master", "init", ], workdir=self.gitRepositoryLocation,