Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: tests/git_cl_test.py

Issue 2421253002: Gerrit git cl: make it work with minimal file. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 90647a713a04f1fe2930a6c784871ca75f615c55..8ef92d301b8eb864e2ee31eb5584d295c8473fcf 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -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'],), ''),
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698