diff options
author | xunchang <xunchang@google.com> | 2019-03-11 11:28:41 -0700 |
---|---|---|
committer | xunchang <xunchang@google.com> | 2019-03-12 15:10:41 -0700 |
commit | 55e3d22223ada3c9da738b4ae2824c11aa0caa91 (patch) | |
tree | 359050fab5388745b28ab86ad7e81575ab0f9ba5 /tests/component/install_test.cpp | |
parent | aefc9e3ba9c4831b3e5fc797ba3c1cf5312c7b6a (diff) | |
download | android_bootable_recovery-55e3d22223ada3c9da738b4ae2824c11aa0caa91.tar.gz android_bootable_recovery-55e3d22223ada3c9da738b4ae2824c11aa0caa91.tar.bz2 android_bootable_recovery-55e3d22223ada3c9da738b4ae2824c11aa0caa91.zip |
Use the package class for wipe packages
The wipe package used to open the zip file directly from the content
string. Switch to use the interface from the new package class instead.
Bug: 127071893
Test: unit tests pass
Change-Id: I990e7f00c5148710722d17140bab2e343eea3b6b
Diffstat (limited to 'tests/component/install_test.cpp')
-rw-r--r-- | tests/component/install_test.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/component/install_test.cpp b/tests/component/install_test.cpp index 11781369..969805b4 100644 --- a/tests/component/install_test.cpp +++ b/tests/component/install_test.cpp @@ -120,7 +120,10 @@ TEST(InstallTest, read_wipe_ab_partition_list) { std::string wipe_package; ASSERT_TRUE(android::base::ReadFileToString(temp_file.path, &wipe_package)); - std::vector<std::string> read_partition_list = GetWipePartitionList(wipe_package); + auto package = Package::CreateMemoryPackage( + std::vector<uint8_t>(wipe_package.begin(), wipe_package.end()), nullptr); + + auto read_partition_list = GetWipePartitionList(package.get()); std::vector<std::string> expected = { "/dev/block/bootdevice/by-name/system_a", "/dev/block/bootdevice/by-name/system_b", "/dev/block/bootdevice/by-name/vendor_a", "/dev/block/bootdevice/by-name/vendor_b", |