update: include stages timing info in update.json

!1627 missed this, so stages only get included in running.json.  That means
the stages info is only visible while update is running, making it hard to
use.
This commit is contained in:
Hans-Christoph Steiner 2025-04-15 18:52:31 +02:00
parent 3b360f6b80
commit 2a33857fd0
No known key found for this signature in database
GPG key ID: 3E177817BA1B9BFA
2 changed files with 5 additions and 6 deletions

View file

@ -1639,7 +1639,7 @@ class UpdateTest(unittest.TestCase):
with mkdtemp() as tmpdir:
os.chdir(tmpdir)
with mock.patch('sys.argv', ['fdroid update', '']):
fdroidserver.update.status_update_json([], [])
fdroidserver.update.status_update_json({}, [], [])
with open('repo/status/update.json') as fp:
data = json.load(fp)
self.assertTrue('apksigner' in data)
@ -1647,14 +1647,14 @@ class UpdateTest(unittest.TestCase):
fdroidserver.update.config = {
'apksigner': 'apksigner',
}
fdroidserver.update.status_update_json([], [])
fdroidserver.update.status_update_json({}, [], [])
with open('repo/status/update.json') as fp:
data = json.load(fp)
self.assertEqual(shutil.which(fdroidserver.update.config['apksigner']), data['apksigner'])
fdroidserver.update.config = {}
fdroidserver.common.fill_config_defaults(fdroidserver.update.config)
fdroidserver.update.status_update_json([], [])
fdroidserver.update.status_update_json({}, [], [])
with open('repo/status/update.json') as fp:
data = json.load(fp)
self.assertEqual(fdroidserver.update.config.get('apksigner'), data['apksigner'])