|
|
|
|
@ -328,6 +328,30 @@ class TestGitCl(TestCase):
|
|
|
|
|
raise result
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
def test_LoadCodereviewSettingsFromFile_gerrit(self):
|
|
|
|
|
codereview_file = StringIO.StringIO('GERRIT_HOST: true')
|
|
|
|
|
self.calls = [
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.cc'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.private'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.tree-status-url'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.viewvc-url'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.bug-prefix'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.cpplint-regex'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.force-https-commit-url'],),
|
|
|
|
|
CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.cpplint-ignore-regex'],),
|
|
|
|
|
CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.project'],), CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.pending-ref-prefix'],),
|
|
|
|
|
CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.git-number-footer'],),
|
|
|
|
|
CERR1),
|
|
|
|
|
((['git', 'config', '--unset-all', 'rietveld.run-post-upload-hook'],),
|
|
|
|
|
CERR1),
|
|
|
|
|
((['git', 'config', 'gerrit.host', 'true'],), ''),
|
|
|
|
|
]
|
|
|
|
|
self.assertIsNone(git_cl.LoadCodereviewSettingsFromFile(codereview_file))
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def _is_gerrit_calls(cls, gerrit=False):
|
|
|
|
|
return [((['git', 'config', 'rietveld.autoupdate'],), ''),
|
|
|
|
|
|