git cl upload for Gerit no-squash: correct detect missing Change-Id.
BUG=579183
Review URL: https://codereview.chromium.org/1761743002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299105 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index f5b3257..f1cee8a 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -660,6 +660,8 @@
self.calls += self._gerrit_upload_calls(
description, reviewers, squash,
expected_upstream_ref=expected_upstream_ref)
+ # Uncomment when debugging.
+ # print '\n'.join(map(lambda x: '%2i: %s' % x, enumerate(self.calls)))
git_cl.main(['upload'] + upload_args)
def test_gerrit_upload_without_change_id(self):
@@ -671,20 +673,20 @@
def test_gerrit_no_reviewer(self):
self._run_gerrit_upload_test(
[],
- 'desc\n\nBUG=\nChange-Id:123456789\n',
+ 'desc\n\nBUG=\n\nChange-Id: I123456789\n',
[])
def test_gerrit_reviewers_cmd_line(self):
self._run_gerrit_upload_test(
['-r', '[email protected]'],
- 'desc\n\nBUG=\nChange-Id:123456789',
+ 'desc\n\nBUG=\n\nChange-Id: I123456789',
['[email protected]'])
def test_gerrit_reviewer_multiple(self):
self._run_gerrit_upload_test(
[],
- 'desc\[email protected]\nBUG=\[email protected]\n'
- 'Change-Id:123456789\n',
+ 'desc\[email protected]\nBUG=\[email protected]\n\n'
+ 'Change-Id: 123456789\n',
['[email protected]', '[email protected]'])
def test_gerrit_upload_squash(self):