1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

tests: include info.zwanenburg.caffeinetile in index tests

This commit is contained in:
Hans-Christoph Steiner 2018-10-10 12:16:43 +02:00
parent 8b251da79f
commit e33c1c74b1
6 changed files with 74 additions and 5 deletions

View File

@ -0,0 +1,4 @@
Categories:
- Development
Name: Caffeine Tile
Summary: Test app for extracting icons when an XML one is default

View File

@ -3,8 +3,8 @@
Development
GuardianProject
Multimedia
None
Phone & SMS
Security
System
Time
tests

View File

@ -41,6 +41,19 @@
"packageName": "souch.smsbypass",
"lastUpdated": 1524700800000
},
{
"categories": [
"Development"
],
"suggestedVersionCode": "4",
"license": "Unknown",
"name": "Caffeine Tile",
"summary": "Test app for extracting icons when an XML one is default",
"added": 1539129600000,
"icon": "info.zwanenburg.caffeinetile.4.xml",
"packageName": "info.zwanenburg.caffeinetile",
"lastUpdated": 1539129600000
},
{
"categories": [
"tests"
@ -411,6 +424,28 @@
"versionName": "0.1"
}
],
"info.zwanenburg.caffeinetile": [
{
"added": 1539129600000,
"apkName": "info.zwanenburg.caffeinetile_4.apk",
"hash": "dbbdd7deadb038862f426b71efe4a64df8c3edf25d669e935f349510e16f65db",
"hashType": "sha256",
"minSdkVersion": "24",
"packageName": "info.zwanenburg.caffeinetile",
"sig": "03f9b2f848d22fd1d8d1331e8b1b486d",
"signer": "51cfa5c8a743833ad89acf81cb755936876a5c8b8eca54d1ffdcec0cdca25d0e",
"size": 11740,
"targetSdkVersion": "25",
"uses-permission": [
[
"android.permission.WAKE_LOCK",
null
]
],
"versionCode": 4,
"versionName": "1.3"
}
],
"no.min.target.sdk": [
{
"added": 1539129600000,
@ -642,4 +677,4 @@
}
]
}
}
}

View File

@ -39,6 +39,35 @@
<permissions>READ_CONTACTS,READ_EXTERNAL_STORAGE,RECEIVE_SMS,SEND_SMS,VIBRATE,WRITE_EXTERNAL_STORAGE</permissions>
</package>
</application>
<application id="info.zwanenburg.caffeinetile">
<id>info.zwanenburg.caffeinetile</id>
<added>2018-10-10</added>
<lastupdated>2018-10-10</lastupdated>
<name>Caffeine Tile</name>
<summary>Test app for extracting icons when an XML one is default</summary>
<icon>info.zwanenburg.caffeinetile.4.xml</icon>
<desc>&lt;p&gt;No description available&lt;/p&gt;</desc>
<license>Unknown</license>
<categories>Development</categories>
<category>Development</category>
<web></web>
<source></source>
<tracker></tracker>
<marketversion></marketversion>
<marketvercode>4</marketvercode>
<package>
<version>1.3</version>
<versioncode>4</versioncode>
<apkname>info.zwanenburg.caffeinetile_4.apk</apkname>
<hash type="sha256">dbbdd7deadb038862f426b71efe4a64df8c3edf25d669e935f349510e16f65db</hash>
<size>11740</size>
<sdkver>24</sdkver>
<targetSdkVersion>25</targetSdkVersion>
<added>2018-10-10</added>
<sig>03f9b2f848d22fd1d8d1331e8b1b486d</sig>
<permissions>WAKE_LOCK</permissions>
</package>
</application>
<application id="duplicate.permisssions">
<id>duplicate.permisssions</id>
<added>2017-12-22</added>

View File

@ -4,6 +4,7 @@ com.politedroid_5.apk com.politedroid 2017-06-23
com.politedroid_6.apk com.politedroid 2017-06-23
duplicate.permisssions_9999999.apk duplicate.permisssions 2017-12-22
fake.ota.update_1234.zip fake.ota.update 2016-03-10
info.zwanenburg.caffeinetile_4.apk info.zwanenburg.caffeinetile 2018-10-10
no.min.target.sdk_987.apk no.min.target.sdk 2018-10-10
obb.main.oldversion_1444412523.apk obb.main.oldversion 2013-12-31
obb.main.twoversions_1101613.apk obb.main.twoversions 2015-10-12

View File

@ -254,7 +254,7 @@ class UpdateTest(unittest.TestCase):
apps = fdroidserver.metadata.read_metadata(xref=True)
knownapks = fdroidserver.common.KnownApks()
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False)
self.assertEqual(len(apks), 14)
self.assertEqual(len(apks), 15)
apk = apks[0]
self.assertEqual(apk['packageName'], 'com.politedroid')
self.assertEqual(apk['versionCode'], 3)
@ -321,7 +321,7 @@ class UpdateTest(unittest.TestCase):
fdroidserver.update.options.clean = False
read_from_json = fdroidserver.update.get_cache()
self.assertEqual(16, len(read_from_json))
self.assertEqual(17, len(read_from_json))
for f in glob.glob('repo/*.apk'):
self.assertTrue(os.path.basename(f) in read_from_json)
@ -623,7 +623,7 @@ class UpdateTest(unittest.TestCase):
knownapks = fdroidserver.common.KnownApks()
apks, cachechanged = fdroidserver.update.process_apks({}, 'repo', knownapks, False)
fdroidserver.update.translate_per_build_anti_features(apps, apks)
self.assertEqual(len(apks), 14)
self.assertEqual(len(apks), 15)
foundtest = False
for apk in apks:
if apk['packageName'] == 'com.politedroid' and apk['versionCode'] == 3: