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>
1 file changed