mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
Addition of IPFS CIDv1 to Index
IPFS CIDv1 is only generated for APKs and "repo files"
This commit is contained in:
parent
5e31f23a96
commit
0ad45a94a8
10 changed files with 60 additions and 6 deletions
|
|
@ -1508,6 +1508,20 @@ class CommonTest(unittest.TestCase):
|
|||
with self.assertRaises(SyntaxError):
|
||||
fdroidserver.common.calculate_math_string('1-1 # no comment')
|
||||
|
||||
def test_calculate_IPFS_cid_with_no_tool(self):
|
||||
fdroidserver.common.config = {'ipfs_cid': None}
|
||||
self.assertIsNone(fdroidserver.common.calculate_IPFS_cid('urzip.apk'))
|
||||
self.assertIsNone(fdroidserver.common.calculate_IPFS_cid('FileDoesNotExist'))
|
||||
|
||||
@unittest.skipUnless(shutil.which('ipfs_cid'), 'calculate_IPFS_cid needs ipfs_cid')
|
||||
def test_calculate_IPFS_cid(self):
|
||||
fdroidserver.common.config = dict()
|
||||
self.assertIsNone(fdroidserver.common.calculate_IPFS_cid('FileDoesNotExist'))
|
||||
self.assertEqual(
|
||||
fdroidserver.common.calculate_IPFS_cid('urzip.apk'),
|
||||
"bafybeigmtgrwyvj77jaflje2rf533haeqtpu2wtwsctryjusjnsawacsam",
|
||||
)
|
||||
|
||||
def test_deploy_build_log_with_rsync_with_id_file(self):
|
||||
|
||||
mocklogcontent = bytes(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue