[WPT import] Add unit tests for TestImporter.do_auto_update |
||||
Issue descriptionThere is code in do_auto_update that is critical for the importer to stay up and running. On the one hand this means we'll notice when things are broken ( issue 739119 ) but if there's any of it that could be placed under test, that might still help catch some issues. qyearsley@, can you say what you think should be done here, and close or assign as appropriate?
,
Jul 6 2017
,
Jul 6 2017
Agreed that at least basic tests should be added. Note, since the main functionality of do_auto_update is to call `git cl` commands and wpt-update-expectations based on try job results, the unit tests won't actually test whether do_auto_update tests in practice, but at least we can add some coverage for most of the lines, and assert that certain commands are called.
,
Jul 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3ec04fc7e8cbfc5cf46779cac3f24d57f239ffe1 commit 3ec04fc7e8cbfc5cf46779cac3f24d57f239ffe1 Author: Quinten Yearsley <qyearsley@google.com> Date: Fri Jul 07 01:22:33 2017 Add basic tests for TestImporter.do_auto_update. In this CL: - Add two basic test methods for do_auto_update - Add a MockGitCL class which can be reused in other places - Rearrange the order of test methods so that tests of public methods come first. Bug: 739155 Change-Id: I14e4215e2f78a637a6419d30b252b7a16a7631db Reviewed-on: https://chromium-review.googlesource.com/562577 Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#484782} [add] https://crrev.com/3ec04fc7e8cbfc5cf46779cac3f24d57f239ffe1/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_mock.py [modify] https://crrev.com/3ec04fc7e8cbfc5cf46779cac3f24d57f239ffe1/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
,
Jul 7 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by foolip@chromium.org
, Jul 5 2017