feat(update): securely stage verified packages

This commit is contained in:
chengma
2026-07-13 12:02:47 +08:00
parent 567d4e7b68
commit 3ad9ffd239
8 changed files with 616 additions and 3 deletions
+5
View File
@@ -43,6 +43,9 @@ class UpdateCheckTests(unittest.TestCase):
"force_update": True,
"download_url": "https://example.test/cmshopee.zip",
"sha256": "abc",
"size_bytes": 123,
"package_format": "cmshopee-portable-v1",
"updater_protocol": 1,
"message": "请升级后继续使用",
}
@@ -57,6 +60,8 @@ class UpdateCheckTests(unittest.TestCase):
self.assertFalse(result.can_enter)
self.assertEqual("1.2.0", result.latest_version)
self.assertEqual("https://example.test/cmshopee.zip", result.download_url)
self.assertEqual(123, result.size_bytes)
self.assertEqual("cmshopee-portable-v1", result.package_format)
def test_check_for_update_accepts_release_wrapper_response(self):
def fetcher(_url, _timeout):