proletarius101
1c33e481e5
test(deploy): fix directory exists error when running tests the second time
2024-06-07 12:48:04 +02:00
proletarius101
80e57f5fb3
test(deploy): fix No such file or directory
2024-06-07 12:48:04 +02:00
proletarius101
eb930c6aab
test(deploy): fix typo in rclone test cases
2024-06-07 12:48:04 +02:00
proletarius101
452b1bf3aa
fix(deploy): fix errors introduced by merging
2024-06-07 12:48:04 +02:00
proletarius101
4bb4fde8ed
feat(deploy): add index-only mode to the rclone deployment method
2024-06-07 12:48:04 +02:00
proletarius101
04a584eff8
style(deploy): fix pyflake
2024-06-07 12:48:04 +02:00
proletarius101
52e3585297
fix(deploy): all files are uploaded if the index only mode deployment follows a full mode one
...
switch the branch before rsyncing
2024-06-07 12:48:04 +02:00
proletarius101
88239fe6fb
test(deploy): make sure the APK file is not uploaded in the index only mode
2024-06-07 12:48:04 +02:00
proletarius101
eef97456ea
fix(deploy): local files are not synced to the local git repo
2024-06-07 12:48:04 +02:00
proletarius101
c2d192024a
fix(deploy): files are not pushed to the remote
2024-06-07 12:48:04 +02:00
proletarius101
c8880f31be
test(deploy): fix fdroidserver.deploy.options is None
2024-06-07 12:48:04 +02:00
proletarius101
a1c225c50d
test(deploy): fix errors
2024-06-07 12:48:04 +02:00
proletarius101
44530a7272
fix(deploy): don't recreate the branches
2024-06-07 12:48:04 +02:00
Hans-Christoph Steiner
0db842881d
fix: avoid making the parent directory redundantly in test case
2024-06-07 12:48:04 +02:00
proletarius101
ad83e1b880
fix: ModuleNotFoundError
2024-06-07 12:48:04 +02:00
proletarius101
ef589531aa
lint: fix black formatting
2024-06-07 12:48:04 +02:00
proletarius101
4c15cea78a
fix(deploy): remove the index-only mode from elsewhere except the config file
...
To enable per-remote configuration
2024-06-07 12:48:04 +02:00
proletarius101
15c8926e75
style: fix lint
2024-06-07 12:48:04 +02:00
proletarius101
12c1cde4f9
style: fix lint
2024-06-07 12:48:04 +02:00
proletarius101
649559b84c
style: fix lint
2024-06-07 12:48:04 +02:00
proletarius101
f06acc5973
refactor: use _get_index_file_paths() instead of this mix of --include/--exclude
2024-06-07 12:48:04 +02:00
proletarius101
76d16ecb81
refactor: remove the support of the index only mode when syncing to the local filesystem
2024-06-07 12:48:04 +02:00
proletarius101
bbd6f37746
feat(deploy): add index only mode in update_servergitmirrors
2024-06-07 12:48:04 +02:00
proletarius101
b7a07af49c
style(deploy): remove unused imports
2024-06-07 12:48:04 +02:00
proletarius101
cd2a17b527
test(deploy): add test cases for update_awsbucket_libcloud and fix errors
2024-06-07 12:48:04 +02:00
proletarius101
d5d2b5368a
test(deploy): add test cases for update_awsbucket_s3cmd
2024-06-07 12:48:04 +02:00
proletarius101
7c1dc60928
fix(deploy): add test cases for local copy mode and fix issues
2024-06-07 12:48:04 +02:00
proletarius101
70fd68f1c6
fix(deploy): add test cases for server webroot mode and fix issues
2024-06-07 12:48:04 +02:00
proletarius101
2958b3be4c
test(deploy): properly test non-index-only mode
2024-06-07 12:48:04 +02:00
paul mayero
7aabfbcbf0
Adding rclone as an option to fdroid deploy
2024-05-29 14:08:07 +00:00
Licaon_Kter
feafe2812d
Fix more tests after !1487
2024-05-22 13:40:27 +00:00
Licaon_Kter
98f935493e
fix test cases
2024-05-22 09:25:49 +00:00
Hans-Christoph Steiner
5745ed4753
common: only try to delete .testfiles dir if it exists
...
Otherwise, some tests fail with an error.
2024-05-08 16:28:14 +02:00
Hans-Christoph Steiner
18f3acc32e
split out options from read_config()
...
There is no longer any reason for these to be intertwined.
This deliberately avoids touching some files as much as possible because
they are super tangled and due to be replaced. Those files are:
* fdroidserver/build.py
* fdroidserver/update.py
# Conflicts:
# tests/testcommon.py
# Conflicts:
# fdroidserver/btlog.py
# fdroidserver/import_subcommand.py
2024-05-08 16:26:46 +02:00
Hans-Christoph Steiner
685efa23d4
import: always load testcommon from localmodule
...
Having this import before sys.path.insert() made it load testcommon from
the Debian package.
2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
1e5699e90c
remove all references to optparse (deprecated since Python 3.2)
2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
717df09be0
clarify that config/options can be global or module-level variable
2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
8208841460
common: make explicit which test cases need mocked options
2024-05-08 16:19:27 +02:00
Hans-Christoph Steiner
ad9f0a9022
include @obfusk's proof-of-concept APKs in test suite
...
https://github.com/obfusk/fdroid-fakesigner-poc/releases/tag/poc-apks
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
fc4a9c96a5
test APK signatures with a cert chain are parsed like apksigner
...
Microsoft and SanDisk sign APKs with a X.509 certificate chain of
trust, so there are actually three certificates included. apksigner
only cares about one certificate and ignores the other certificates in
the chain.
The correct values come from:
apksigner verify --print-certs 883cbdae7aeb2e4b122e8ee8d89966c7062d0d49107a130235fa220a5b994a79.apk
X.509 certificates are machine generated and just data, so are not
copyrightable. So I included SANAPPSI.* directly.
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
accdd65f91
also handle APKs entirely without JAR/v1 signatures
...
future-proofing!
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
9a327b5097
reliable implementation of get_first_signer_certificate()
...
This keeps key pieces of @linsui's algorithm, specifically the check
that all certificates are the same. apksigner also does this check.
closes #1128
2024-05-07 16:22:59 +02:00
Hans-Christoph Steiner
1b65e33835
make it easy to keep test artifacts from jobs
...
When troubleshooting things that are difficult to reproduce locally, like
different behaviors in the fedora_latest job, these changes make it easy to
keep the test files around after the tests run. For example, if PNGs are
processed differently by newer Python versions.
2024-05-07 12:58:23 +00:00
Hans-Christoph Steiner
299e3e5f4c
index: handle image processing diffs across various Python versions
...
Apparently, the newest Python thingies strip the PNGs a tiny bit smaller,
so a fixed file size will lead to the test failing:
https://gitlab.com/fdroid/fdroidserver/-/jobs/6703386074
```
Traceback (most recent call last):
File "/builds/fdroid/fdroidserver/tests/index.TestCase", line 704, in test_package_metadata
self.assertEqual(36027, metadata['featureGraphic']['en-US']['size'])
AssertionError: 36027 != 35619
```
2024-05-07 12:58:23 +00:00
Hans-Christoph Steiner
9a9b5beeaa
simplify test setup
...
I'm in the midst of working towards getting rid of the "config" instances
that are in the subcommand module, e.g. `fdroidserver.lint.config`
2024-05-07 11:33:04 +00:00
Hans-Christoph Steiner
14c8647909
add additional tests
2024-05-07 11:33:04 +00:00
linsui
d243cbd030
lint: blocklist known AOSP debug keys in AASK
2024-05-07 11:33:04 +00:00
Hans-Christoph Steiner
5b7abc0423
single function to tame androguard's verbose default output
...
# Conflicts:
# fdroidserver/common.py
2024-04-25 12:39:12 +02:00
Hans-Christoph Steiner
7a144a4762
port to androguard >= 4 and drop support for older than 3.3.3
...
This also makes androguard a hard requirement, which has been true for a
while anyway. So the code that handles androguard as an optional
requirement is removed. androguard from Debian/buster is new enough, so
this does not seem like it will cause any problems.
2024-04-25 12:39:12 +02:00
Hans-Christoph Steiner
cdc7c98707
common.get_androguard_APK() is no longer private to the module
2024-04-25 12:39:12 +02:00