diff options
author | android-build-prod (mdb) <android-build-team-robot@google.com> | 2018-04-26 18:43:25 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-04-26 18:43:25 +0200 |
commit | 7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65 (patch) | |
tree | 044f24fe5d41b2ac833bbef487032a7065bf7ca5 /tests/component/updater_test.cpp | |
parent | Merge "updater_sample: Use stubs libs for android.test.base / runner." am: d97b643de4 (diff) | |
parent | Merge "Rename CacheLocation to Paths." (diff) | |
download | android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar.gz android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar.bz2 android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar.lz android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar.xz android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.tar.zst android_bootable_recovery-7acf21c34aa2f84ab4aa42b3a1c85e92679b6a65.zip |
Diffstat (limited to 'tests/component/updater_test.cpp')
-rw-r--r-- | tests/component/updater_test.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/component/updater_test.cpp b/tests/component/updater_test.cpp index 5bfd7cb40..5d3b2d996 100644 --- a/tests/component/updater_test.cpp +++ b/tests/component/updater_test.cpp @@ -41,8 +41,8 @@ #include "common/test_constants.h" #include "edify/expr.h" #include "otautil/SysUtil.h" -#include "otautil/cache_location.h" #include "otautil/error_code.h" +#include "otautil/paths.h" #include "otautil/print_sha1.h" #include "updater/blockimg.h" #include "updater/install.h" @@ -106,10 +106,9 @@ class UpdaterTest : public ::testing::Test { RegisterInstallFunctions(); RegisterBlockImageFunctions(); - // Mock the location of last_command_file. - CacheLocation::location().set_cache_temp_source(temp_saved_source_.path); - CacheLocation::location().set_last_command_file(temp_last_command_.path); - CacheLocation::location().set_stash_directory_base(temp_stash_base_.path); + Paths::Get().set_cache_temp_source(temp_saved_source_.path); + Paths::Get().set_last_command_file(temp_last_command_.path); + Paths::Get().set_stash_directory_base(temp_stash_base_.path); } TemporaryFile temp_saved_source_; @@ -719,7 +718,7 @@ TEST_F(UpdaterTest, brotli_new_data) { } TEST_F(UpdaterTest, last_command_update) { - std::string last_command_file = CacheLocation::location().last_command_file(); + std::string last_command_file = Paths::Get().last_command_file(); std::string block1 = std::string(4096, '1'); std::string block2 = std::string(4096, '2'); @@ -806,7 +805,7 @@ TEST_F(UpdaterTest, last_command_update) { } TEST_F(UpdaterTest, last_command_update_unresumable) { - std::string last_command_file = CacheLocation::location().last_command_file(); + std::string last_command_file = Paths::Get().last_command_file(); std::string block1 = std::string(4096, '1'); std::string block2 = std::string(4096, '2'); @@ -861,7 +860,7 @@ TEST_F(UpdaterTest, last_command_update_unresumable) { } TEST_F(UpdaterTest, last_command_verify) { - std::string last_command_file = CacheLocation::location().last_command_file(); + std::string last_command_file = Paths::Get().last_command_file(); std::string block1 = std::string(4096, '1'); std::string block2 = std::string(4096, '2'); |