Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: delta_performer_unittest.cc

Issue 5516009: AU: Split applied update verification into a separate step. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: review comments Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « delta_performer.cc ('k') | download_action.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_performer_unittest.cc
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index 42f237b153a487459f2517190dc6f5095a6123b1..238731aec981a89b442449052b14477d69e2c40e 100755
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -315,11 +315,11 @@ void DoSmallImageTest(bool full_kernel, bool full_rootfs, bool noop) {
OmahaHashCalculator::RawHashOfFile(a_img,
image_size,
&rootfs_hash));
- performer.set_current_rootfs_hash(&rootfs_hash);
+ performer.set_current_rootfs_hash(rootfs_hash);
vector<char> kernel_hash;
EXPECT_TRUE(OmahaHashCalculator::RawHashOfData(old_kernel_data,
&kernel_hash));
- performer.set_current_kernel_hash(&kernel_hash);
+ performer.set_current_kernel_hash(kernel_hash);
EXPECT_EQ(0, performer.Open(a_img.c_str(), 0, 0));
EXPECT_TRUE(performer.OpenKernel(old_kernel.c_str()));
@@ -347,7 +347,27 @@ void DoSmallImageTest(bool full_kernel, bool full_rootfs, bool noop) {
kUnittestPublicKeyPath,
OmahaHashCalculator::OmahaHashOfData(delta),
delta.size()));
- EXPECT_TRUE(performer.VerifyAppliedUpdate(a_img, old_kernel));
+
+ uint64_t new_kernel_size;
+ vector<char> new_kernel_hash;
+ uint64_t new_rootfs_size;
+ vector<char> new_rootfs_hash;
+ EXPECT_TRUE(performer.GetNewPartitionInfo(&new_kernel_size,
+ &new_kernel_hash,
+ &new_rootfs_size,
+ &new_rootfs_hash));
+ EXPECT_EQ(4096, new_kernel_size);
+ vector<char> expected_new_kernel_hash;
+ EXPECT_TRUE(OmahaHashCalculator::RawHashOfData(new_kernel_data,
+ &expected_new_kernel_hash));
+ EXPECT_TRUE(expected_new_kernel_hash == new_kernel_hash);
+ EXPECT_EQ(image_size, new_rootfs_size);
+ vector<char> expected_new_rootfs_hash;
+ EXPECT_EQ(image_size,
+ OmahaHashCalculator::RawHashOfFile(b_img,
+ image_size,
+ &expected_new_rootfs_hash));
+ EXPECT_TRUE(expected_new_rootfs_hash == new_rootfs_hash);
}
}
« no previous file with comments | « delta_performer.cc ('k') | download_action.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698