cbuildbot_launch: Change default branch to main

Manifest-internal has migrated to main, master
as the default no longer makes sense.

BUG=chromium:1200010
TEST=run_test

Change-Id: Ief16c50ec4ad47668571fc93ffbbf320e8832529
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2837195
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
Commit-Queue: Julio Hurtado <juahurta@google.com>
Tested-by: Julio Hurtado <juahurta@google.com>
diff --git a/scripts/cbuildbot_launch_unittest.py b/scripts/cbuildbot_launch_unittest.py
index 2b74611..9bb3db1 100644
--- a/scripts/cbuildbot_launch_unittest.py
+++ b/scripts/cbuildbot_launch_unittest.py
@@ -150,7 +150,7 @@
                      autospec=True, return_value=(constants.REEXEC_API_MAJOR,
                                                   constants.REEXEC_API_MINOR))
     mock_repo = mock.MagicMock()
-    mock_repo.branch = 'master'
+    mock_repo.branch = 'main'
     mock_repo.directory = '/root/repository'
 
     mock_repo_create = self.PatchObject(repository, 'RepoRepository',
@@ -166,7 +166,7 @@
 
     expected_build_state = build_summary.BuildSummary(
         build_number=0, master_build_id=0, status=mock.ANY,
-        buildroot_layout=2, branch='master')
+        buildroot_layout=2, branch='main')
 
     argv = ['-r', '/root', 'config']
     options = cbuildbot_launch.PreParseArguments(argv)
@@ -175,7 +175,7 @@
     # Did we create the repo instance correctly?
     self.assertEqual(mock_repo_create.mock_calls,
                      [mock.call(EXPECTED_MANIFEST_URL, '/root/repository',
-                                git_cache_dir=None, branch='master')])
+                                git_cache_dir=None, branch='main')])
 
     # Ensure we clean, as expected.
     self.assertEqual(mock_clean.mock_calls, [
@@ -344,18 +344,18 @@
 
   def testNoBuildroot(self):
     """Test CleanBuildRoot with no history."""
-    self.mock_repo.branch = 'master'
+    self.mock_repo.branch = 'main'
 
     build_state = build_summary.BuildSummary(
         status=constants.BUILDER_STATUS_INFLIGHT,
         buildroot_layout=cbuildbot_launch.BUILDROOT_BUILDROOT_LAYOUT,
-        branch='master')
+        branch='main')
     cbuildbot_launch.CleanBuildRoot(
         self.root, self.mock_repo, self.cache, build_state)
 
     new_summary = cbuildbot_launch.GetLastBuildState(self.root)
     self.assertEqual(new_summary.buildroot_layout, 2)
-    self.assertEqual(new_summary.branch, 'master')
+    self.assertEqual(new_summary.branch, 'main')
     self.assertIsNotNone(new_summary.distfiles_ts)
     self.assertEqual(new_summary, build_state)
 
@@ -364,18 +364,18 @@
   def testBuildrootNoState(self):
     """Test CleanBuildRoot with no state information."""
     self.populateBuildroot()
-    self.mock_repo.branch = 'master'
+    self.mock_repo.branch = 'main'
 
     build_state = build_summary.BuildSummary(
         status=constants.BUILDER_STATUS_INFLIGHT,
         buildroot_layout=cbuildbot_launch.BUILDROOT_BUILDROOT_LAYOUT,
-        branch='master')
+        branch='main')
     cbuildbot_launch.CleanBuildRoot(
         self.root, self.mock_repo, self.cache, build_state)
 
     new_summary = cbuildbot_launch.GetLastBuildState(self.root)
     self.assertEqual(new_summary.buildroot_layout, 2)
-    self.assertEqual(new_summary.branch, 'master')
+    self.assertEqual(new_summary.branch, 'main')
     self.assertIsNotNone(new_summary.distfiles_ts)
     self.assertEqual(new_summary, build_state)
 
@@ -390,20 +390,20 @@
     old_build_state = build_summary.BuildSummary(
         status=constants.BUILDER_STATUS_PASSED,
         buildroot_layout=1,
-        branch='master')
+        branch='main')
     self.populateBuildroot(previous_build_state=old_build_state.to_json())
-    self.mock_repo.branch = 'master'
+    self.mock_repo.branch = 'main'
 
     build_state = build_summary.BuildSummary(
         status=constants.BUILDER_STATUS_INFLIGHT,
         buildroot_layout=cbuildbot_launch.BUILDROOT_BUILDROOT_LAYOUT,
-        branch='master')
+        branch='main')
     cbuildbot_launch.CleanBuildRoot(
         self.root, self.mock_repo, self.cache, build_state)
 
     new_summary = cbuildbot_launch.GetLastBuildState(self.root)
     self.assertEqual(new_summary.buildroot_layout, 2)
-    self.assertEqual(new_summary.branch, 'master')
+    self.assertEqual(new_summary.branch, 'main')
     self.assertIsNotNone(new_summary.distfiles_ts)
     self.assertEqual(new_summary, build_state)
 
@@ -665,12 +665,12 @@
     options = cbuildbot_launch.PreParseArguments([
         '--buildroot', self.root, 'config'
     ])
-    state = cbuildbot_launch.GetCurrentBuildState(options, 'master')
+    state = cbuildbot_launch.GetCurrentBuildState(options, 'main')
 
     expected_state = build_summary.BuildSummary(
         status=constants.BUILDER_STATUS_INFLIGHT,
         buildroot_layout=2,
-        branch='master')
+        branch='main')
     self.assertEqual(state, expected_state)
 
   def testGetCurrentBuildStateHasArgs(self):