Skip checking local vs remote patchset for Gerrit
BUG=chromium:664520
Change-Id: Idd5855e14f6237577b351ff51582335996522417
Reviewed-on: https://chromium-review.googlesource.com/399118
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index dcd5308..82d830a 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -2037,7 +2037,6 @@
((['git', 'config', 'branch.feature.gerritserver'],),
'https://chromium-review.googlesource.com'),
((['_GetChangeDetail', []],), {'status': 'OPEN'}),
- ((['git', 'config', 'branch.feature.gerritpatchset'],), '7'),
((['_GetChangeDetail', ['DETAILED_ACCOUNTS']],),
{'owner': {'email': 'owner@e.mail'}}),
((['_GetChangeDetail', ['ALL_REVISIONS']],), {
@@ -2368,8 +2367,10 @@
((['git', 'symbolic-ref', 'HEAD'],), 'feature'),
((['git', 'config', 'branch.feature.rietveldissue'],), CERR1),
((['git', 'config', 'branch.feature.gerritissue'],), '1'),
+ # TODO(tandrii): Uncomment the below if we decide to support checking
+ # patchsets for Gerrit.
# Simulate that Gerrit has more patchsets than local.
- ((['git', 'config', 'branch.feature.gerritpatchset'],), '12'),
+ # ((['git', 'config', 'branch.feature.gerritpatchset'],), '12'),
((['git', 'config', 'branch.feature.gerritserver'],),
'https://x-review.googlesource.com'),
((['get_authenticator_for_host', 'x-review.googlesource.com'],),
@@ -2379,18 +2380,21 @@
def test_fetch_try_jobs_none_gerrit(self):
self._setup_fetch_try_jobs_gerrit({})
self.assertEqual(0, git_cl.main(['try-results']))
- self.assertRegexpMatches(
- sys.stdout.getvalue(),
- r'Warning: Codereview server has newer patchsets \(13\)')
+ # TODO(tandrii): Uncomment the below if we decide to support checking
+ # patchsets for Gerrit.
+ # self.assertRegexpMatches(
+ # sys.stdout.getvalue(),
+ # r'Warning: Codereview server has newer patchsets \(13\)')
self.assertRegexpMatches(sys.stdout.getvalue(), 'No try jobs')
def test_fetch_try_jobs_some_gerrit(self):
self._setup_fetch_try_jobs_gerrit({
'builds': self.BUILDBUCKET_BUILDS_MAP.values(),
})
- # Explicit --patchset means actual local patchset doesn't matter.
- self.calls.remove(
- ((['git', 'config', 'branch.feature.gerritpatchset'],), '12'))
+ # TODO(tandrii): Uncomment the below if we decide to support checking
+ # patchsets for Gerrit.
+ # self.calls.remove(
+ # ((['git', 'config', 'branch.feature.gerritpatchset'],), '12'))
self.assertEqual(0, git_cl.main(['try-results', '--patchset', '5']))
# ... and doesn't result in warning.