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

Unified Diff: autoupdate_unittest.py

Issue 5057005: Revert "Reworked devserver so that update images generated are cached in directories named after" (Closed) Base URL: http://git.chromium.org/git/dev-util.git@master
Patch Set: Created 10 years, 1 month 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 | « autoupdate.py ('k') | devserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: autoupdate_unittest.py
diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
index 0aaa5d373ceed95afa00606976d304c7c354ed12..0cf0062ecd5082576cedf2cc7f0e618e9ed04a92 100755
--- a/autoupdate_unittest.py
+++ b/autoupdate_unittest.py
@@ -60,14 +60,14 @@ class AutoupdateTest(mox.MoxTestBase):
return dummy
def testGenerateLatestUpdateImageWithForced(self):
- self.mox.StubOutWithMock(autoupdate.Autoupdate,
- 'GenerateUpdateImageWithCache')
+ self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GenerateUpdateImage')
autoupdate.Autoupdate._GetLatestImageDir(self.test_board).AndReturn(
'%s/%s/%s' % (self.build_root, self.test_board, self.latest_dir))
- autoupdate.Autoupdate.GenerateUpdateImageWithCache(
+ autoupdate.Autoupdate.GenerateUpdateImage(
'%s/%s/%s/chromiumos_image.bin' % (self.build_root, self.test_board,
self.latest_dir),
- static_image_dir=self.static_image_dir).AndReturn('update.gz')
+ move_to_static_dir=True,
+ static_image_dir=self.static_image_dir).AndReturn(True)
self.mox.ReplayAll()
au_mock = self._DummyAutoupdateConstructor()
@@ -77,14 +77,14 @@ class AutoupdateTest(mox.MoxTestBase):
self.mox.VerifyAll()
def testHandleUpdatePingForForcedImage(self):
- self.mox.StubOutWithMock(autoupdate.Autoupdate,
- 'GenerateUpdateImageWithCache')
+ self.mox.StubOutWithMock(autoupdate.Autoupdate, 'GenerateUpdateImage')
test_data = _TEST_REQUEST % self.test_dict
- autoupdate.Autoupdate.GenerateUpdateImageWithCache(
+ autoupdate.Autoupdate.GenerateUpdateImage(
self.forced_image_path,
- static_image_dir=self.static_image_dir).AndReturn('update.gz')
+ move_to_static_dir=True,
+ static_image_dir=self.static_image_dir).AndReturn(True)
autoupdate.Autoupdate._GetHash(os.path.join(
self.static_image_dir, 'update.gz')).AndReturn(self.hash)
autoupdate.Autoupdate._GetSHA256(os.path.join(
@@ -107,8 +107,7 @@ class AutoupdateTest(mox.MoxTestBase):
test_data = _TEST_REQUEST % self.test_dict
autoupdate.Autoupdate.GenerateLatestUpdateImage(
- self.test_board, 'ForcedUpdate', self.static_image_dir).AndReturn(
- 'update.gz')
+ self.test_board, 'ForcedUpdate', self.static_image_dir).AndReturn(True)
autoupdate.Autoupdate._GetHash(os.path.join(
self.static_image_dir, 'update.gz')).AndReturn(self.hash)
autoupdate.Autoupdate._GetSHA256(os.path.join(
@@ -130,7 +129,7 @@ class AutoupdateTest(mox.MoxTestBase):
test_data = _TEST_REQUEST % self.test_dict
autoupdate.Autoupdate.GenerateImageFromZip(
- self.static_image_dir).AndReturn('update.gz')
+ self.static_image_dir).AndReturn(True)
autoupdate.Autoupdate._GetHash(os.path.join(
self.static_image_dir, 'update.gz')).AndReturn(self.hash)
autoupdate.Autoupdate._GetSHA256(os.path.join(
« no previous file with comments | « autoupdate.py ('k') | devserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698