mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-02 16:14:25 +00:00
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 <jrn@google.com> Tested-by: Mike Frysinger <vapier@google.com>
This commit is contained in:
parent
dc5c4d1d11
commit
e283b95cf2
@ -77,7 +77,7 @@ class ReviewableBranchTests(unittest.TestCase):
|
|||||||
|
|
||||||
# Start off with the normal details.
|
# Start off with the normal details.
|
||||||
rb = project.ReviewableBranch(
|
rb = project.ReviewableBranch(
|
||||||
fakeproj, fakeproj.config.GetBranch('work'), 'master')
|
fakeproj, fakeproj.config.GetBranch('work'), 'main')
|
||||||
self.assertEqual('work', rb.name)
|
self.assertEqual('work', rb.name)
|
||||||
self.assertEqual(1, len(rb.commits))
|
self.assertEqual(1, len(rb.commits))
|
||||||
self.assertIn('Del file', rb.commits[0])
|
self.assertIn('Del file', rb.commits[0])
|
||||||
@ -90,9 +90,9 @@ class ReviewableBranchTests(unittest.TestCase):
|
|||||||
self.assertTrue(rb.date)
|
self.assertTrue(rb.date)
|
||||||
|
|
||||||
# Now delete the tracking branch!
|
# Now delete the tracking branch!
|
||||||
fakeproj.work_git.branch('-D', 'master')
|
fakeproj.work_git.branch('-D', 'main')
|
||||||
rb = project.ReviewableBranch(
|
rb = project.ReviewableBranch(
|
||||||
fakeproj, fakeproj.config.GetBranch('work'), 'master')
|
fakeproj, fakeproj.config.GetBranch('work'), 'main')
|
||||||
self.assertEqual(0, len(rb.commits))
|
self.assertEqual(0, len(rb.commits))
|
||||||
self.assertFalse(rb.base_exists)
|
self.assertFalse(rb.base_exists)
|
||||||
# Hard to assert anything useful about this.
|
# Hard to assert anything useful about this.
|
||||||
|
@ -402,8 +402,8 @@ class ResolveRepoRev(GitCheckoutTestCase):
|
|||||||
self.assertEqual('refs/heads/stable', rrev)
|
self.assertEqual('refs/heads/stable', rrev)
|
||||||
self.assertEqual(self.REV_LIST[1], lrev)
|
self.assertEqual(self.REV_LIST[1], lrev)
|
||||||
|
|
||||||
rrev, lrev = self.wrapper.resolve_repo_rev(self.GIT_DIR, 'master')
|
rrev, lrev = self.wrapper.resolve_repo_rev(self.GIT_DIR, 'main')
|
||||||
self.assertEqual('refs/heads/master', rrev)
|
self.assertEqual('refs/heads/main', rrev)
|
||||||
self.assertEqual(self.REV_LIST[0], lrev)
|
self.assertEqual(self.REV_LIST[0], lrev)
|
||||||
|
|
||||||
def test_tag_name(self):
|
def test_tag_name(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user