mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-20 13:50:12 +01:00
fix: minor bugs in testcases for: common, metadata, update
This commit is contained in:
parent
28ec93c587
commit
5d5617bf40
@ -822,7 +822,7 @@ class CommonTest(unittest.TestCase):
|
|||||||
'-e',
|
'-e',
|
||||||
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
|
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
|
||||||
cmd[6],
|
cmd[6],
|
||||||
'example.com:/var/www/fdroid/repo/buildlogs'],
|
'example.com:/var/www/fdroid/repo/buildlogs/'],
|
||||||
cmd)
|
cmd)
|
||||||
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
|
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
|
||||||
with gzip.open(cmd[6], 'r') as f:
|
with gzip.open(cmd[6], 'r') as f:
|
||||||
@ -835,7 +835,7 @@ class CommonTest(unittest.TestCase):
|
|||||||
'-e',
|
'-e',
|
||||||
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
|
'ssh -oBatchMode=yes -oIdentitiesOnly=yes -i ssh/id_rsa',
|
||||||
cmd[6],
|
cmd[6],
|
||||||
'example.com:/var/www/fdroid/archive/buildlogs'],
|
'example.com:/var/www/fdroid/archive/buildlogs/'],
|
||||||
cmd)
|
cmd)
|
||||||
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
|
self.assertTrue(cmd[6].endswith('/com.example.app_4711_1.log.gz'))
|
||||||
with gzip.open(cmd[6], 'r') as f:
|
with gzip.open(cmd[6], 'r') as f:
|
||||||
|
@ -22,7 +22,7 @@ License: GPL-3.0-only
|
|||||||
Litecoin: null
|
Litecoin: null
|
||||||
MaintainerNotes: ''
|
MaintainerNotes: ''
|
||||||
Name: null
|
Name: null
|
||||||
NoSourceSince: ''
|
NoSourceSince: '1.5'
|
||||||
Provides: null
|
Provides: null
|
||||||
Repo: https://github.com/miguelvps/PoliteDroid.git
|
Repo: https://github.com/miguelvps/PoliteDroid.git
|
||||||
RepoType: git
|
RepoType: git
|
||||||
|
@ -49,7 +49,9 @@ class SignaturesTest(unittest.TestCase):
|
|||||||
'99fbb3211ef5d7c1253f3a7ad4836eadc9905103ce6a75916c40de2831958284'),
|
'99fbb3211ef5d7c1253f3a7ad4836eadc9905103ce6a75916c40de2831958284'),
|
||||||
)
|
)
|
||||||
for path, checksum in filesAndHashes:
|
for path, checksum in filesAndHashes:
|
||||||
self.assertTrue(os.path.isfile(path))
|
self.assertTrue(os.path.isfile(path),
|
||||||
|
msg="check whether '{path}' was extracted "
|
||||||
|
"correctly.".format(path=path))
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
self.assertEqual(hashlib.sha256(f.read()).hexdigest(), checksum)
|
self.assertEqual(hashlib.sha256(f.read()).hexdigest(), checksum)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user