From e283b95cf2c95befcb2b67259fd8877c1c36d25e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 16 Nov 2020 22:56:35 -0500 Subject: [PATCH] tests: use new main branch Now that we clone "main" by default, use that for our local test. Change-Id: Ib8420074bdfabfcb9d5252a3a0ecd3d852ca36e8 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/288422 Reviewed-by: Jonathan Nieder Tested-by: Mike Frysinger --- tests/test_project.py | 6 +++--- tests/test_wrapper.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_project.py b/tests/test_project.py index 4e710ae5..924a2459 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -77,7 +77,7 @@ class ReviewableBranchTests(unittest.TestCase): # Start off with the normal details. rb = project.ReviewableBranch( - fakeproj, fakeproj.config.GetBranch('work'), 'master') + fakeproj, fakeproj.config.GetBranch('work'), 'main') self.assertEqual('work', rb.name) self.assertEqual(1, len(rb.commits)) self.assertIn('Del file', rb.commits[0]) @@ -90,9 +90,9 @@ class ReviewableBranchTests(unittest.TestCase): self.assertTrue(rb.date) # Now delete the tracking branch! - fakeproj.work_git.branch('-D', 'master') + fakeproj.work_git.branch('-D', 'main') rb = project.ReviewableBranch( - fakeproj, fakeproj.config.GetBranch('work'), 'master') + fakeproj, fakeproj.config.GetBranch('work'), 'main') self.assertEqual(0, len(rb.commits)) self.assertFalse(rb.base_exists) # Hard to assert anything useful about this. diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index e18ceb19..d22dc4ee 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -402,8 +402,8 @@ class ResolveRepoRev(GitCheckoutTestCase): self.assertEqual('refs/heads/stable', rrev) self.assertEqual(self.REV_LIST[1], lrev) - rrev, lrev = self.wrapper.resolve_repo_rev(self.GIT_DIR, 'master') - self.assertEqual('refs/heads/master', rrev) + rrev, lrev = self.wrapper.resolve_repo_rev(self.GIT_DIR, 'main') + self.assertEqual('refs/heads/main', rrev) self.assertEqual(self.REV_LIST[0], lrev) def test_tag_name(self):