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

Unified Diff: tests/git_cl_test.py

Issue 1692513002: Gerrit git cl: run same post-upload hooks. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 10 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 c24a4d8fec553d7abe979606e352516c141e8852..53815f64c9fba0647fbce692fada4e4a8f592a23 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -227,6 +227,11 @@ class TestGitCl(TestCase):
'https://codereview.example.com'],), ''),
((['git',
'config', 'branch.master.rietveldpatchset', '2'],), ''),
+ ] + cls._git_post_upload_calls()
+
+ @classmethod
+ def _git_post_upload_calls(cls):
+ return [
((['git', 'rev-parse', 'HEAD'],), 'hash'),
((['git', 'symbolic-ref', 'HEAD'],), 'hash'),
((['git',
@@ -574,8 +579,8 @@ class TestGitCl(TestCase):
'+dat'),
]
- @staticmethod
- def _gerrit_upload_calls(description, reviewers, squash,
+ @classmethod
+ def _gerrit_upload_calls(cls, description, reviewers, squash,
expected_upstream_ref='origin/refs/heads/master'):
calls = [
((['git', 'config', '--bool', 'gerrit.squash-uploads'],), 'false'),
@@ -640,7 +645,7 @@ class TestGitCl(TestCase):
'refs/heads/git_cl_uploads/master', 'abcdef0123456789'],),
'')
]
-
+ calls += cls._git_post_upload_calls()
return calls
def _run_gerrit_upload_test(
« 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