mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
gerrit_client: introduce add message command
Bug: 378480632 Change-Id: I411b3136db27a5ca2b43481bc9b650bef93f5275 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6012758 Auto-Submit: Yiwei Zhang <yiwzhang@google.com> Commit-Queue: Yiwei Zhang <yiwzhang@google.com> Reviewed-by: Scott Lee <ddoman@chromium.org>
This commit is contained in:
@@ -158,6 +158,23 @@ class TestGerritClient(unittest.TestCase):
|
||||
1,
|
||||
labels={'some-label': '-2'})
|
||||
|
||||
@mock.patch('gerrit_util.SetReview', return_value='')
|
||||
def test_addmessage(self, util_mock):
|
||||
gerrit_client.main([
|
||||
'addmessage',
|
||||
'--host',
|
||||
'https://example.org/foo',
|
||||
'-c',
|
||||
'1',
|
||||
'-r',
|
||||
'2',
|
||||
'-m',
|
||||
'This is a message',
|
||||
])
|
||||
util_mock.assert_called_once_with('example.org',
|
||||
1,
|
||||
revision='2',
|
||||
msg='This is a message')
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(
|
||||
|
||||
Reference in New Issue
Block a user