New issue
Advanced search Search tips

Issue 739155 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[WPT import] Add unit tests for TestImporter.do_auto_update

Project Member Reported by foolip@chromium.org, Jul 4 2017

Issue description

There 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?
 
Status: Available (was: Untriaged)
Owner: qyears...@chromium.org
Status: Started (was: Available)
Cc: -qyears...@chromium.org
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.
Project Member

Comment 4 by bugdroid1@chromium.org, 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

Status: Fixed (was: Started)

Sign in to add a comment