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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Issue 1809723002: Remove optional --commit-author argument from auto-rebaseline script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 RIETVELD_REFRESH_TOKEN = '/creds/refresh_tokens/test_rietveld_token' 1415 RIETVELD_REFRESH_TOKEN = '/creds/refresh_tokens/test_rietveld_token'
1416 self._basic_execute_test( 1416 self._basic_execute_test(
1417 [ 1417 [
1418 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV ELD_REFRESH_TOKEN], 1418 ['git', 'cl', 'upload', '-f', '--auth-refresh-token-json', RIETV ELD_REFRESH_TOKEN],
1419 ['git', 'pull'], 1419 ['git', 'pull'],
1420 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R IETVELD_REFRESH_TOKEN], 1420 ['git', 'cl', 'land', '-f', '-v', '--auth-refresh-token-json', R IETVELD_REFRESH_TOKEN],
1421 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv eldissue'], 1421 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv eldissue'],
1422 ], 1422 ],
1423 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN) 1423 auth_refresh_token_json=RIETVELD_REFRESH_TOKEN)
1424 1424
1425 def test_execute_with_commit_author(self):
1426 COMMIT_AUTHOR = "JRR Tolkien <tolkien@greyhavens.org>"
1427 self._basic_execute_test(
1428 [
1429 ['git', 'cl', 'upload', '-f'],
1430 ['git', 'pull'],
1431 ['git', 'cl', 'land', '-f', '-v'],
1432 ['git', 'config', 'branch.auto-rebaseline-temporary-branch.rietv eldissue'],
1433 ], commit_author=COMMIT_AUTHOR)
1434 self.assertEqual(self.tool.scm().local_commits(),
1435 [['Auto-rebaseline for r1234\n\nhttps://chromium.googlesource.com/ch romium/src/+/6469e754a1\n\nTBR=foobarbaz1@chromium.org\n',
1436 True,
1437 COMMIT_AUTHOR]])
1438
1439 def test_execute_with_dry_run(self): 1425 def test_execute_with_dry_run(self):
1440 self._basic_execute_test([], dry_run=True) 1426 self._basic_execute_test([], dry_run=True)
1441 self.assertEqual(self.tool.scm().local_commits(), []) 1427 self.assertEqual(self.tool.scm().local_commits(), [])
1442 1428
1443 1429
1444 class TestRebaselineOMatic(_BaseTestCase): 1430 class TestRebaselineOMatic(_BaseTestCase):
1445 command_constructor = RebaselineOMatic 1431 command_constructor = RebaselineOMatic
1446 1432
1447 def setUp(self): 1433 def setUp(self):
1448 super(TestRebaselineOMatic, self).setUp() 1434 super(TestRebaselineOMatic, self).setUp()
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 oc.capture_output() 1468 oc.capture_output()
1483 self.command._do_one_rebaseline() 1469 self.command._do_one_rebaseline()
1484 out, _, _ = oc.restore_output() 1470 out, _, _ = oc.restore_output()
1485 1471
1486 self.assertEqual(out, 'MOCK STDOUT\n') 1472 self.assertEqual(out, 'MOCK STDOUT\n')
1487 self.assertEqual(self.tool.executive.calls, [ 1473 self.assertEqual(self.tool.executive.calls, [
1488 ['git', 'pull'], 1474 ['git', 'pull'],
1489 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au to-rebaseline', '--verbose'], 1475 ['/mock-checkout/third_party/WebKit/Tools/Scripts/webkit-patch', 'au to-rebaseline', '--verbose'],
1490 ]) 1476 ])
1491 self.assertEqual(self._logs, ['MOCK STDOUT']) 1477 self.assertEqual(self._logs, ['MOCK STDOUT'])
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698