mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
owners: Use DepotToolsClient while code-owners plugin is fixed.
Bug: 1183447 Change-Id: I11c67b13ace08eb5bafb90756bd45af6ff39f12f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2727569 Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
@@ -234,6 +234,6 @@ def GetCodeOwnersClient(root, host, project, branch):
|
|||||||
|
|
||||||
Defaults to GerritClient, and falls back to DepotToolsClient if code-owners
|
Defaults to GerritClient, and falls back to DepotToolsClient if code-owners
|
||||||
plugin is not available."""
|
plugin is not available."""
|
||||||
if gerrit_util.IsCodeOwnersEnabled(host):
|
# TODO(crbug.com/1183447): Use code-owners plugin if available on host once
|
||||||
return GerritClient(host, project, branch)
|
# code-owners plugin issues have been fixed.
|
||||||
return DepotToolsClient(root, branch)
|
return DepotToolsClient(root, branch)
|
||||||
|
|||||||
@@ -313,10 +313,9 @@ class GetCodeOwnersClientTest(unittest.TestCase):
|
|||||||
self.addCleanup(mock.patch.stopall)
|
self.addCleanup(mock.patch.stopall)
|
||||||
|
|
||||||
def testGetCodeOwnersClient_GerritClient(self):
|
def testGetCodeOwnersClient_GerritClient(self):
|
||||||
gerrit_util.IsCodeOwnersEnabled.return_value = True
|
# TODO(crbug.com/1183447): Check that code-owners is used if available once
|
||||||
self.assertIsInstance(
|
# code-owners plugin issues have been fixed.
|
||||||
owners_client.GetCodeOwnersClient('root', 'host', 'project', 'branch'),
|
pass
|
||||||
owners_client.GerritClient)
|
|
||||||
|
|
||||||
def testGetCodeOwnersClient_DepotToolsClient(self):
|
def testGetCodeOwnersClient_DepotToolsClient(self):
|
||||||
gerrit_util.IsCodeOwnersEnabled.return_value = False
|
gerrit_util.IsCodeOwnersEnabled.return_value = False
|
||||||
|
|||||||
Reference in New Issue
Block a user