summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorAmin Hassani <ahassani@chromium.org>2019-03-29 11:31:03 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-23 02:43:44 -0700
commit41ac04b6e8bc9e30d8436171f3eb54e3958e8cd6 (patch)
tree3dc4e9048dfbdcb2bee9e2f2cf017911f8ee02df /scripts/update_payload/format_utils.py
parent7fca28632aaac41c8a2f2f29b519ac8a7387e65c (diff)
update_engine: Simplify unittests in omaha_request_action_unittest.cc
This file has a ton of unittests that call the function TestUpdateCheck() with specific parameters. The problem is if we want to add a new parameter to the function, we either have to add the parameter to all call sites (around 100 one of them, which is cumbersome) or add a new function with default parameters (which will get ugly). So instead just create a new structure |TestUpdateCheckParams| with default values to use instead of passing parameters to the function itself. So: - Removed one version of TestUpdateCheck(). - Removed TestRollbackCheck() and replaced with TestUpdateCheck(). - Also modified the output parameters of the TestUpdateCheck() to be in the class itself so unittests can just look them up. BUG=none TEST=unittest Change-Id: I96b40bffb74d15ae4567652b0153179496b6a200 Reviewed-on: https://chromium-review.googlesource.com/1544865 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Xiaochu Liu <xiaochu@chromium.org> Reviewed-by: Sen Jiang <senj@chromium.org>
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions