devserver: deprecate payload signing
There is not gonna be use case for this feature anymore. We are not
supposed to generate or sign payloads with devserver so this should be
cut off.
BUG=chromium:872441
TEST=unittest
TEST=start_devserver
Change-Id: I88599d666f27b683a311d690e7822a81079e47aa
Reviewed-on: https://chromium-review.googlesource.com/1595104
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Congbin Guo <guocb@chromium.org>
diff --git a/autoupdate_unittest.py b/autoupdate_unittest.py
index 903af51..98efbb3 100755
--- a/autoupdate_unittest.py
+++ b/autoupdate_unittest.py
@@ -91,26 +91,22 @@
**kwargs)
return dummy
- def testGetRightSignedDeltaPayloadDir(self):
- """Test that our directory is what we expect it to be for signed updates."""
+ def testGetRightDeltaPayloadDir(self):
+ """Test that our directory is what we expect it to be for updates."""
self.mox.StubOutWithMock(common_util, 'GetFileMd5')
- key_path = 'test_key_path'
src_image = 'test_src_image'
target_image = 'test_target_image'
src_hash = '12345'
target_hash = '67890'
- key_hash = 'abcde'
common_util.GetFileMd5(src_image).AndReturn(src_hash)
common_util.GetFileMd5(target_image).AndReturn(target_hash)
- common_util.GetFileMd5(key_path).AndReturn(key_hash)
self.mox.ReplayAll()
au_mock = self._DummyAutoupdateConstructor()
- au_mock.private_key = key_path
update_dir = au_mock.FindCachedUpdateImageSubDir(src_image, target_image)
self.assertEqual(os.path.basename(update_dir),
- '%s_%s+%s' % (src_hash, target_hash, key_hash))
+ '%s_%s' % (src_hash, target_hash))
self.mox.VerifyAll()
def testGenerateLatestUpdateImage(self):
@@ -167,9 +163,6 @@
update_image = os.path.join(cache_dir, constants.UPDATE_FILE)
with open(update_image, 'w') as fh:
fh.write('')
- metadata_hash = os.path.join(cache_dir, constants.METADATA_HASH_FILE)
- with open(metadata_hash, 'w') as fh:
- fh.write('')
common_util.IsInsideChroot().AndReturn(True)
au_mock.GenerateUpdateImageWithCache(forced_image).WithSideEffects(
@@ -270,9 +263,6 @@
update_gz = os.path.join(new_image_dir, constants.UPDATE_FILE)
with open(update_gz, 'w') as fh:
fh.write('')
- metadata_hash = os.path.join(new_image_dir, constants.METADATA_HASH_FILE)
- with open(metadata_hash, 'w') as fh:
- fh.write('')
common_util.GetFileSha1(os.path.join(
new_image_dir, 'update.gz')).AndReturn(self.sha1)