mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-06 01:11:07 +03:00
support manually adding per-build antiFeatures in metadata
For cases like the OpenVPN vuln that was recently announced, it is useful for fdroiddata maintainers to be able to mark builds that have known vulnerabilities.
This commit is contained in:
parent
20afa0e861
commit
df99c85ca6
10 changed files with 356 additions and 2 deletions
|
@ -43,14 +43,16 @@ class MetadataTest(unittest.TestCase):
|
|||
fdroidserver.common.config = config
|
||||
|
||||
apps = fdroidserver.metadata.read_metadata(xref=True)
|
||||
for appid in ('org.smssecure.smssecure', 'org.adaway', 'org.videolan.vlc'):
|
||||
for appid in ('org.smssecure.smssecure', 'org.adaway',
|
||||
'org.videolan.vlc', 'com.politedroid'):
|
||||
savepath = os.path.join('metadata', 'dump', appid + '.yaml')
|
||||
frommeta = dict(apps[appid])
|
||||
self.assertTrue(appid in apps)
|
||||
with open(savepath, 'r') as f:
|
||||
frompickle = yaml.load(f)
|
||||
self.assertEqual(frommeta, frompickle)
|
||||
# Uncomment to overwrite
|
||||
# comment above assert and uncomment below to update test
|
||||
# files when new metadata fields are added
|
||||
# with open(savepath, 'w') as f:
|
||||
# yaml.add_representer(fdroidserver.metadata.Build, _build_yaml_representer)
|
||||
# yaml.dump(frommeta, f, default_flow_style=False)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue