History log of /system/update_engine/omaha_request_params_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8500d3a0b3e3944d7390e0eff6e9d39f92261085 08-Feb-2018 Sen Jiang <senj@google.com> Always powerwash on channel change if arbitrary channel allowed.

Merged is_powerwash_allowed() and to_more_stable_channel() into
ShouldPowerwash().

Bug: 73082835
Test: update_engine_unittests
Change-Id: I6b7af0d1dac28d5fa9cddf4391bbd9cdf2acb57b
/system/update_engine/omaha_request_params_unittest.cc
ce3f7cf69f3a03a5371beecae003651fa7f953a3 25-Jan-2018 Sen Jiang <senj@google.com> Make sure channel ends with -channel.

Also changed to_more_stable_channel() to return true for arbitrary channels.

Bug: 72259103
Test: update_engine_unittests

Change-Id: Ifddbc5f28563c956241c69141523c5a73ba53151
/system/update_engine/omaha_request_params_unittest.cc
7f785f584d943308b06596f8d279e9c4b711adb6 24-Jan-2018 Sen Jiang <senj@google.com> Allow arbitrary channels in Android.

Add a new image property allow_arbitrary_channels which is true on
Android and false on Chrome OS.

Bug: 72259103
Test: adb shell update_engine_client --channel=foo-channel
Change-Id: I70a0980fd877ee32d6152595f8d4462bf43254a2
/system/update_engine/omaha_request_params_unittest.cc
2b9d2417722cd4052b0e22494886f93c5b4ef042 13-Dec-2017 Hidehiko Abe <hidehiko@google.com> update_engine: Update libchrome APIS to r456626.

The new libchrome has been ported from Chromium and some APIs
have changed. Make necessary changes at call sites.

BUG=chromium:724678
CQ-DEPEND=CL:480928
Test: Build.

Change-Id: I01b70da87521d0884ed21acbd7ed3e0ff1e94357
Merged-In: I4dbaea4a2a19031375a8bf2415645a4f226dab57
/system/update_engine/omaha_request_params_unittest.cc
297e583af1cec04f5f332b57b91f846921744c91 17-Mar-2016 Sen Jiang <senj@google.com> Fix OmahaRequest unittests in Brillo.

Moved lsb_release related tests to ImagePropertiesTest.

Bug: 26955860
Test: GTEST_FILTER="Omaha*" ./update_engine_unittests
Test: cros_workon_make update_engine --test

Change-Id: I124c9374e7556b04c65bdac80e1b89064dee4008
/system/update_engine/omaha_request_params_unittest.cc
39910dcd1d68987ccee7c3031dc269233a8490bb 10-Nov-2015 Alex Deymo <deymo@google.com> Split payload application code into a subdirectory.

This patch splits from the main libupdate_engine code the part that
is strictly used to download and apply a payload into a new static
library, moving the code to subdirectories. The new library is divided
in two subdirectories: common/ and payload_consumer/, and should not
depend on other update_engine files outside those two subdirectories.
The main difference between those two is that the common/ tools are more
generic and not tied to the payload consumer process, but otherwise they
are both compiled together.

There are still dependencies from the new libpayload_consumer library
into the main directory files and DBus generated files. Those will be
addressed in follow up CLs.

Bug: 25197634
Test: FEATURES=test emerge-link update_engine; `mm` on Brillo.

Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/omaha_request_params_unittest.cc
d942f9d3c8529f896329b19261df6eba044de1b2 07-Nov-2015 Alex Deymo <deymo@google.com> Return the error reason to the caller of SetTargetChannel.

This patch sends back to the caller an error message indicating why the
channel change didn't work.

Bug: 25595865
Test: Deployed on a device and attempted to change to "foo" channel. Error message lists available channels.
Test: FEATURES=test emerge-link update_engine

Change-Id: Idcc67d5c7878ce7af60652d7bf5bf81135325f97
/system/update_engine/omaha_request_params_unittest.cc
3be05c82442b2fbab693b6399f64610e8542462b 23-Oct-2015 Alex Deymo <deymo@google.com> Fix use-after-free in unittest setup code.

When setting the root prefix in a unittest, we need to reset it after
so it isn't accidentally used by other tests.

Bug: chromium:547127
Test: USE="clang asan" FEATURES=test emerge-link update_engine

Change-Id: Ib84bbf265a380976407100a4fba4d2600d62dde6
/system/update_engine/omaha_request_params_unittest.cc
856166594771c61973856f563e622ccb7dd48aa1 16-Oct-2015 Alex Deymo <deymo@google.com> Read ProductId, ProductVersion and Channel setting in Brillo.

The ProductId, ProductVersion and current/target channels are specified
in a very different way in Brillo compared to Chrome OS. This patch
moves the logic to read and parse /etc/lsb-release in Chrome OS to a
new image_properties module and implements the equivalent module in
Brillo.

This new module replaces some of the logic previously in the
OmahaRequestParams class, both for parsing the read-only properties
from the rootfs and parsing and storing the target channel in the
stateful partition. The Chrome OS version of the new module keeps the
same behavior, except that it falls back to "stable-channel" if the
the current channel is missing in the rootfs (unlikely in Chrome OS).

On the other hand, the new Brillo implementation reads these settings
from the /etc/osrelease file and /etc/osrelease.d directory and doesn't
allow to override those setting during development. The persisted
target_channel and powerwash_allowed settings are stored in Prefs
as many other settings. Finally, since Brillo images don't contain
a channel name baked in the image, we store the channel name where we
got the image from at the time of the update. The first boot after
provisioning will default to "stable-channel".

Bug: 25013069
Test: unittest in Chrome OS; `mm` and tested on a Brillo device.

Change-Id: Icc114b8098af3edaaba715c9c2e3ebe9f417c876
/system/update_engine/omaha_request_params_unittest.cc
ac41a82e4be1be43913292d13d58b5eb2c572f53 16-Sep-2015 Alex Deymo <deymo@google.com> Set default updater URL and version per platform.

Chrome OS and Brillo devices require different production update URL
and updater string ID sent to Omaha. This patch moves these constants
to a platform-dependent file with the definition of the constants.

Bug: brillo:587,brillo:588
Test: FEATURES=test emerge-link update_engine; `mma`; deployed on a dragonboard.

Change-Id: Ibe3b30c32c2fb2caf3ed10a4198272dc13a44d12
/system/update_engine/omaha_request_params_unittest.cc
aea4c1cea20dda7ae7e85fc8924a2d784f70d806 20-Aug-2015 Alex Deymo <deymo@google.com> Re-license update_engine to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi files, the NOTICE was
replaced with a copy of the Apache2 license and MODULE_LICENSE_* file
was updated.

BUG=b/23084294
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
/system/update_engine/omaha_request_params_unittest.cc
610277efc6f7e5239158dfa4bb3b1021804326e0 12-Nov-2014 Alex Deymo <deymo@chromium.org> update_engine: Add override when possible.

Google Style Guide requires to include the "override" keyword
when overriding a method on a derived class, so the compiler will
catch errors if the method is not overriding a member of the base
class.

This patch introduces the "override" keyword when possible.

BUG=None
TEST=FEATURES=test emerge-link update_engine

Change-Id: Ie83d115c5730f3b35b3d95859a54bc1a48e0be7b
Reviewed-on: https://chromium-review.googlesource.com/228928
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
10875d90cf67f883ba7c9ed13bc8d706aa8c6fbc 11-Nov-2014 Alex Deymo <deymo@chromium.org> update_engine: Move test-only utils to test_utils.{h,cc}.

utils.{h,cc} contains a collections of basic or small functions used
in different parts of the codebase. The test_utils.{h,cc} instead
contains functions only required during testing split out to a
separated file to be reused in different tests.

This CL moves without changes some functions defined in utils.h that
were only used during unittests. Two other basic functions were replaced
by the same function already present in base/ (StringHasSuffix and
StringHasPrefix). The functions in test_utils.h now have their own
namespace chromeos_update_engine::test_utils so is clear they come
from the test_utils file, in the same way the ones from utils are
in their own namespace.

Some othe minor linter fixes included here.

BUG=chromium:351429
TEST=Unittest still pass.

Change-Id: I73ab72a14158cb21c8e1f404cbc728423bc8f34f
Reviewed-on: https://chromium-review.googlesource.com/229021
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
8427b4a6d0e6e02beedbb53798272f8ddc39386f 05-Nov-2014 Alex Deymo <deymo@chromium.org> update_engine: Standarize mock/fake filenames.

Mock classes implement mostly MOCK_METHOD* methods used with gmock.
Those classes should be named with the prefix "Mock" in the class
name and "mock_" in the header filename.

Fake classes implement a working version of the interface they provide,
often with extra functionality to change their behavior. Those classes
should be prefixed with "Fake" in the class name and "fake_" in the
file name.

Other minor include order fixes are included in this patch.

BUG=None
TEST=Unittest still pass.

Change-Id: I23de7cb11e25182d5855afacca47d431c97b82bb
Reviewed-on: https://chromium-review.googlesource.com/227779
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
06c76a49bfd29c8abdb8abd5b646a6583783191a 05-Sep-2014 Ben Chan <benchan@chromium.org> Update code to include base/files/file_util.h

file_util.h was moved from base to base/files
(https://codereview.chromium.org/468253002). This CL updates platform2
code to include base/files/file_util.h instead of base/file_util.h.

BUG=chromium:411001
TEST=Trybot run on paladin, release, and chromiumos-sdk builders.

Change-Id: I488925b54615e131e508a460dc1a27f88168f936
Reviewed-on: https://chromium-review.googlesource.com/216851
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
88b591f24cb3f94f982d7024c2e8ed25c2cc26a2 29-Aug-2014 Alex Vakulenko <avakulenko@chromium.org> update_engine: Replace NULL with nullptr

Replaced the usage of NULL with nullptr. This also makes it possible to
use standard gtest macros to compare pointers in Update Manager's unit tests.
So, there is no need in custom UMTEST_... macros which are replaced with the
gtest macros (see change in update_engine/update_manager/umtest_utils.h):

UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p)
UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p)
UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p)
UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p)

BUG=None
TEST=FEATURES=test emerge-link update_engine
USE="clang asan" FEATURES=test emerge-link update_engine

Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec
Reviewed-on: https://chromium-review.googlesource.com/215136
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
d2779df63aaad8b65fc5d4badee7dbc9bed7f2b6 16-Jun-2014 Alex Vakulenko <avakulenko@chromium.org> update_engine: fixed warnings from cpplint

Fixed all the cpplint warnings in update engine.

BUG=None
TEST=Unit tests still pass.

Change-Id: I285ae858eec8abe0b26ff203b99a42a200ceb71c
Reviewed-on: https://chromium-review.googlesource.com/204027
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
5bb4c90b8bdf931426d1926b21b0316a86b4b4e4 10-Apr-2014 Gilad Arnold <garnold@chromium.org> Rename MockSystemState into FakeSystemState.

This class is no longer a mock. The change also includes renaming the
appropriate files and the instances of this class.

BUG=chromium:358278
TEST=Unit tests.

Change-Id: Ifc20ead0d624eddf8827a6e6f39cd9b9207dcabf
Reviewed-on: https://chromium-review.googlesource.com/194088
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
d04f8e24716d5acca6a7d116b63851adc1506845 09-Jan-2014 Gilad Arnold <garnold@chromium.org> AU: prepend TMPDIR when creating a temp file/directory

This changes the behavior of utils::MakeTemp{File,Directory} to prepend
TMPDIR (or /tmp, if not defined) to the given path template. That is,
unless the user provided an absolute path, or a path that is explicitly
relative to the current directory (starts with ./ or ../).

BUG=chromium:253622
TEST=None

Change-Id: Ibe11b279f8f4e9ba97bb2d44867595f76bbf632a
Reviewed-on: https://chromium-review.googlesource.com/182098
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
522d36ffca22b8c218cdc6a2d1dbab40f6d9b215 29-Oct-2013 J. Richard Barnette <jrbarnette@chromium.org> Move simple firmware related queries into HardwareInterface.

This change moves the following functions from utils to
HardwareInterface:
GetHardwareClass()
GetFirmwareVersion()
GetECVersion()

BUG=None
TEST=unit tests

Change-Id: I20047a3fac8cca3c36730fef305751e6da3c2bb5
Reviewed-on: https://chromium-review.googlesource.com/174930
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
c9abbec864f283d1873883bc8f9b523020ee2acb 01-Jul-2013 Gilad Arnold <garnold@chromium.org> AU/unittest: use uniquely named test directories in OmahaRequestParamsTest

This should prevent name clashes when unit tests are run in parallel.

BUG=chromium:236465
TEST=Uniquely named test directories used

Change-Id: I364580eaea34dda03ff74d95fc1717c1afa89822
Reviewed-on: https://gerrit.chromium.org/gerrit/60646
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
c1972483fa3446852b42ce97d1ea43b9caaaf56f 01-May-2013 Chris Sosa <sosa@chromium.org> Add EC and Firmware Versions to the Omaha Response.

This CL adds 2 additional utils methods to get the version for both the
fw and ec versions. I've added a unittest to verify these work and piped
in the values into the omaha response.

BUG=chromium:219871
TEST=Unittests + on device

Change-Id: Iadf70fff858988f52797d94bcdb062bb2482bbf3
Reviewed-on: https://gerrit.chromium.org/gerrit/49713
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
be45bef9e283188b00e7def8967f81843669a7f1 10-Apr-2013 Chris Sosa <sosa@chromium.org> Add update reboot metric to the update engine.

This change add the Installer.UpdateNumReboots metric.

This records the number of reboots that occurred while an update was being
attempted. It uses a marker file stored in tmp to discover whether or not
it's already recorded the reboot.

BUG=chromium:226766
TEST=Unittests | ran an update on a test machine and rebooted/resumed and
checked about:histograms to confirm numbers. Also restart update-engine to
verify it didn't double count that.

Change-Id: I5d2af9d5b62a9d974c7c6243a89cb3359051b650
Reviewed-on: https://gerrit.chromium.org/gerrit/47710
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
db0acdfca1ea33987e8b29325f4594417d1fae57 02-Apr-2013 Jay Srinivasan <jaysri@chromium.org> Support changing from non-canary to canary channel in update engine.

Now that we have added support in lsb-release for both the board appid
and canary app id to be specified, we should use the appropriate appid
according to the channel from which we want to download the new payload.

This change in update engine will enable the change from non-canary to
canary channels. This feature when be lit up end to end when the UI for
this scenario is ready.

BUG=chromium:225866
TEST=Unit tests pass. Tested all channel changes on my ZGB.

Change-Id: Ia9c37c72f53f6c69436f0a96e35d2584d84653c8
Reviewed-on: https://gerrit.chromium.org/gerrit/47181
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
1c0fe79c7ef2b43946d756b54c8505d2bf48b93b 29-Mar-2013 Jay Srinivasan <jaysri@chromium.org> Cancel the current download if user chooses a different channel.

In my earlier CL, to keep the implementation simple, we disallowed changing
a channel until the previous change completed in its entirety. Given that
the UI is not going to be updated for M27, such a restriction turned out
to be very confusing when playing around with channel changing. So, we
decided to implement a simple form of canceling the download if the
user selected a different channel while we're downloading the bits. This
implementation can easily be extended to support a general form of cancel
in the future, if required.

This CL also adds validation of libchromeos API calls when interpreting
the policy values. It also cleans up some bogus error messages that were
logged earlier when we abort a download.

BUG=chromium:222617
TEST=All scenarios pass on ZGB. Unit Tests pass.

Change-Id: I7cd691fe461d9ce47314299f6e2598944650ee33
Reviewed-on: https://gerrit.chromium.org/gerrit/46095
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
ae4697c073b84b260990a141acd53c6806da0708 19-Mar-2013 Jay Srinivasan <jaysri@chromium.org> Enhanced channel changing behavior

This CL adds a new DBUS API to UpdateEngine called SetTargetChannel to
change the current channel of the device with an option to indicate
whether to do eventually or immediately.

The API will be called with the option to do it immediately in a
subsequent CL in Chrome UI. For now the old API (set_track) has been
wired up to call the new API to produce the old behavior (i.e. change
eventually). The old API will be removed after Chrome UI code stops
using it.

It's the UI's responsibility to ask the user for confirmation for the
powerwash that may happen in some cases and call the API with the
appropriate value whether or not the powerwash should happen.

For now, we're restricting the changing of channels to only those
devices that are on canary-channel or running test builds. This
restriction will be lifted off once the UI work is ready to give
warning to the users about the powerwash that may happen when they move
to a more stable channel.

We also enforce ReleaseChannelDelegated and ReleaseChannel policies
correctly now as follows:

* If ReleaseChannelDelegated is false, SetTargetChannel will fail as we
need to honor (only) the ReleaseChannel value in this case.
* If ReleaseChannelDelegated is true, we'll allow the SetTargetChannel
call to specify. In this case, we'll ignore the value of ReleaseChannel,
if any.

BUG=chromium-os:39095
TEST=Tested on ZGB by going from canary to dev-channel with and without
powerwash.
TEST=Existing unit tests have been updated and they pass.
TEST=New unit tests have been added.

Change-Id: Ifbf806a06e1c30d2f318e94d73735d1812049abd
Reviewed-on: https://gerrit.chromium.org/gerrit/44619
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
bbdd4909bcd20448ad89aa1e02c936e42aedf548 11-Jan-2013 Gilad Arnold <garnold@chromium.org> AU: add an interactive flag to Omaha requests

Such a flag can be used to distinguish between user-initiated
(interactive) checks and those that are due to background scheduling. In
the former case, we may want to suppress the probabilistic throttling
that's commonly used with latest releases. This CL piggybacks the new
functionality on top of an existing dataflow used for distinguishing
between interactive / scheduled checks, only it pushes it further so it
is evident in the Omaha request as well.

Comes with a unit test for ensuring that the Omaha flag is set as
expected.

BUG=chromium-os:26594
TEST=Dbus initiated checks correctly tainted

Change-Id: Ia2b3ff5ce3a866c64e453557028b8cbd92c1a258
Reviewed-on: https://gerrit.chromium.org/gerrit/41081
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
55f50c24c2624487b803ba2f93588494cc69e523 11-Jan-2013 Jay Srinivasan <jaysri@chromium.org> Segregate UMA metrics for production scenarios from test scenarios.

Currently we separate the UMA metrics only by one category: whether the
device is in dev mode or not. In addition, we need to exclude the noise
from these two categories:
1. Most of our testing on MP-signed images which are performed
with autest.
2. All our hwlab tests run in non-dev mode but they use dev-signed images
with dev-firmware keys.

So this CL defines additional bit fields to represent these states and
if any of these three flags are set, the UMA metric is sent to a
DevModeErrorCodes bucket. Thus the NormalErrorCodes bucket will have only
the production errors and thus we can monitor more effectively.

BUG=chromium-os:37613
TEST=Updated unit tests, ran on ZGB for all scenarios.
Change-Id: Id9cce33f09d1cc50cb15e67c731f7548940cbc24
Reviewed-on: https://gerrit.chromium.org/gerrit/41103
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
19a45f0eda0917b7788b925b501e774208474fde 19-Jul-2012 Gilad Arnold <garnold@chromium.org> Fixes to utility / unit test related code.

* Eliminated bugs related to reading content from pipes/files, including
general cleanup/refactoring of these code pieces and API.

* Eliminated bugs related binding/unbinding of loopback devices, which
are used in unit testing.

BUG=chromium-os:31082
TEST=Builds and runs unit tests

CQ-DEPEND=Ib7b3552e98ca40b6141688e2dea5a1407db12b2a

Change-Id: Ifaab8697602a35ce7d7fb9384fdcb1ca64b72515
Reviewed-on: https://gerrit.chromium.org/gerrit/27911
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Commit-Ready: Gilad Arnold <garnold@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
0bf896039390540c06386773fdb427e24285746a 22-Mar-2012 Don Garrett <dgarrett@google.com> Add the dogfood-channel to the list of channels we forward to Omaha.

There is code the checks channel names against an approved list and
hides any that aren't expected. I'm not sure why, but this change
adds the dogfood channel to the list of approved channels.

BUG=chromium-os:28206
TEST=Unittests updated and pass, QA will confirm in the field.

Change-Id: Ic9119d062cde83d00d66e7c9ec3143057033b454
Reviewed-on: https://gerrit.chromium.org/gerrit/18894
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Commit-Ready: Don Garrett <dgarrett@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
7fbbe8a9e57ec52f7bc597d0cb607036300ac54c 01-Aug-2011 Patrick Dubroy <dubroy@chromium.org> Update engine should use the release channel policy if it exists.

The release channel (aka update track) can be specified by a device
policy. When this is the case, the update engine should use the
value specified by the policy instead of the value specified in
/etc/lsb-release.

BUG=chromium-os:17015
TEST=Added two new tests:
- Added test that OmahaRequestParams uses the release channel passed
in to it when the value is valid, and otherwise uses /etc/lsb-release.
- Added test that the update engine correctly picks up the release
channel that's specified by the policy.

Change-Id: I2fe03712220bb3286476b12cd1f1b330ad006d7c
Reviewed-on: http://gerrit.chromium.org/gerrit/5072
Tested-by: Patrick Dubroy <dubroy@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
f2065b4d77be793fe0a5b4280fe23433cbecaa1b 18-May-2011 Darin Petkov <petkov@chromium.org> AU: Use crossystem hwid to obtain the hardware class.

This is more portable than reading the HWID from the ACPI file and should work
on ARM.

BUG=chromium-os:15255
TEST=unit tests, ran AU on Cr-48, checked the Omaha update check request

Change-Id: I8a2750140da7da99c217a6976f46b1b226696276
Reviewed-on: http://gerrit.chromium.org/gerrit/1078
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
/system/update_engine/omaha_request_params_unittest.cc
dc92876513b1298537d53d1bc82d4c293b3e4d48 12-Apr-2011 Andrew de los Reyes <adlr@chromium.org> AU: stable channel

This adds a stable-channel track to the updater.

BUG=chromium-os:14071
TEST=unittests

Change-Id: I6ed83594134c06e160537638974473c119bd8874

Review URL: http://codereview.chromium.org/6823087
/system/update_engine/omaha_request_params_unittest.cc
10d02dd60d4c4f41f7f4ed92322fa7b597760118 10-Jan-2011 Darin Petkov <petkov@chromium.org> AU: Don't allow stateful /etc/lsb-release override in normal boot mode...

... on official images except for the release track.

BUG=chromium-os:6244
TEST=unit tests, tested on device

Change-Id: I2d2a634c7b5ac7dd4619f52d1f79b6d88c359e46

Review URL: http://codereview.chromium.org/6225001
/system/update_engine/omaha_request_params_unittest.cc
a3df55badfc7dc25792aba1ca6e7ade582b566a7 15-Nov-2010 Darin Petkov <petkov@chromium.org> AU: Don't allow deltas if the rootfs track is different than the request track.

Currently such deltas are destined to fail because the rootfs hash will be
different than the expected hash.

BUG=9160
TEST=unit tests, tested on device

Change-Id: I588fcedb4a0ae16aca7197f771afab077d78fe05

Review URL: http://codereview.chromium.org/4988002
/system/update_engine/omaha_request_params_unittest.cc
d315dc7f336ceff8c1648ccd1a199ebb8c0a5a84 15-Nov-2010 Darin Petkov <petkov@chromium.org> AU: Allow override of "appid" through the lsb-release file.

This will allow us to split Omaha configurations into OEM-specific files.

BUG=6145
TEST=unit tests, tested on device

Change-Id: I1f9b44d2a984988723ec81bf77594161c35460a2

Review URL: http://codereview.chromium.org/5022001
/system/update_engine/omaha_request_params_unittest.cc
3f375c7209de38b1d178c59f9fa990d77f20c7c0 05-Nov-2010 Darin Petkov <petkov@chromium.org> AU: Add test-channel to the list of valid tracks.

BUG=8384
TEST=unit tests

Change-Id: Ifbf6918c70301de4437f6c161aa6d761e3ad47ba

Review URL: http://codereview.chromium.org/4520001
/system/update_engine/omaha_request_params_unittest.cc
49d91329a3a84d7e2b35f6e1ffc8a9b4d478515b 26-Oct-2010 Darin Petkov <petkov@chromium.org> AU: Implement switching of tracks through SetTrack.

On official images, update engine allows updating the track
only to dev-channel or beta-channel. The track is verified
both at setting and at getting time.

BUG=8104
TEST=unit test; tested on device

Change-Id: Ic81d4e3a9e09554d2239ee5c7a6c78e4dfe30d19

Review URL: http://codereview.chromium.org/4103002
/system/update_engine/omaha_request_params_unittest.cc
fbb40098314ab45efa60667ad7ccae354c4f18da 30-Jul-2010 Darin Petkov <petkov@chromium.org> Add a hardware_class attribute (for HWID, HWQual ID) to the Omaha request.

BUG=1600
TEST=unit tests, gmerge and looked at request logs

Review URL: http://codereview.chromium.org/3007020
/system/update_engine/omaha_request_params_unittest.cc
84c763cffce6778711792944387fadb760c55c8d 30-Jul-2010 Darin Petkov <petkov@chromium.org> AU: Remove instances of Omaha ID -- machine ID and user ID.

Also add a unit test to make sure we are not sending machineid or userid
attributes.

BUG=1439
TEST=unit tests, gmerged on device, checked for update, looked at logs

Review URL: http://codereview.chromium.org/2808082
/system/update_engine/omaha_request_params_unittest.cc
5a7f565a542196f24eb87ddac96508f8a84e3329 23-Jul-2010 Darin Petkov <petkov@chromium.org> Add support to update_engine_client for -app_version and -omaha_url.

These options prevent auto-detection of these parameters.
Note that this CL makes the check_for_update DBus method obsolete from
the client's point of view.

BUG=4593
TEST=unit tests, gmerged on device and tried the client with different options.

Review URL: http://codereview.chromium.org/3048008
/system/update_engine/omaha_request_params_unittest.cc
3f0303aa211e2de2d466cef063ff6f39fffe32dd 16-Jul-2010 Andrew de los Reyes <adlr@chromium.org> AU: pass whether or not we can tolerate a delta to the server

BUG=4848
TEST=attached unittests

Review URL: http://codereview.chromium.org/3017006
/system/update_engine/omaha_request_params_unittest.cc
a4a8a8ccc2d9e0285728ed247b43f09433e63323 16-Jul-2010 Darin Petkov <petkov@chromium.org> Turn OmahaRequestPrepAction into OmahaRequestDeviceParams.

Pass the params to OmahaRequestAction's ctor. This simplifies a bit
executing as well as testing of OmahaRequestAction and testing of
OmahaRequestDeviceParams. It also allows us to initialize the params
once per update attempt and use them for all OmahaRequestActions.

BUG=560
TEST=unit tests, gmerged on device and forced an update through dev server,
inspected logs.

Review URL: http://codereview.chromium.org/2836053
/system/update_engine/omaha_request_params_unittest.cc