mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
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:
parent
3b360f6b80
commit
2a33857fd0
2 changed files with 5 additions and 6 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue