fdroidserver/tests
Simon Chopin 89a282c12e test_net: figure out the proper IP protocol for localhost
On some systems, localhost is only defined for 127.0.0.1 (e.g. Ubuntu
and Debian containers). However, there is code that hardcodes possible
values for localhost, making it possible to open an IPv6 socket for
localhost.

On those systems, the socket will be open but urllib3 will resolve
localhost *only* to 127.0.0.1, thus failing miserably to connect.

To resolve the situation, rather than defaulting to IPv6 we actually
resolve localhost and use the socket family of the first result. On my
current system (upcoming Ubuntu Plucky) if localhost=::1 is defined in
/etc/hosts it will come up as the first result, if not 127.0.0.1 will.

V2: Use self.port rather than a forgotten hardcoded port.

Fixes: f01628ca6b "fix localhost network tests on systems with IPv6"
2025-01-20 10:33:49 +00:00
..
build/info.guardianproject.urzip metadata: test to check that metadata/*.yml overrides .fdroid.yml 2023-05-11 10:37:45 +02:00
build-tools Added test aapt output files for build-tools 28.0.3 2019-01-13 19:27:02 +01:00
builder build: read VM CPUs/RAM from builder/Vagrantfile 2022-11-15 08:57:41 +01:00
config add 'non-changeable' to NonFreeNet description 2024-02-21 17:13:58 +01:00
extra disable pylint no-member on tests/extra/manual-vmtools-test.py 2023-03-20 17:38:10 +01:00
get_android_tools_versions common.get_android_tools_versions() for modern NDK dir layout 2023-04-11 13:54:17 +02:00
gnupghome gpg-sign all valid files in the repo, including source tarballs 2016-11-07 14:53:01 +01:00
metadata Remove all mentions of Flattr 2024-09-23 07:59:08 +00:00
metadata-rewrite-yml Remove all mentions of Flattr 2024-09-23 07:59:08 +00:00
repo Remove all mentions of Flattr 2024-09-23 07:59:08 +00:00
signindex Support ETag when downloading repository index 2017-05-02 15:37:02 -03:00
source-files scanner: catalog: relax VERSION_CATALOG_REGEX 2024-10-20 21:21:28 +08:00
triple-t-2 update: parse Triple-T v2.x layout 2019-10-04 14:11:40 +02:00
triple-t-anysoftkeyboard install openjdk 11 from bullseye repo instead in the test cases 2024-03-14 13:14:41 +01:00
triple-t-flutter Add test case for Triple-T metadata in a Flutter project 2022-03-07 12:40:37 +01:00
triple-t-multiple update test_insert_triple_t_multiple_metadata() test data 2021-08-03 20:53:56 +02:00
valid-package-names move all test metadata files to .yml format 2020-06-10 09:56:31 +02:00
__init__.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
aosp_testkey_debug.keystore nightly: support OpenSSL 3.0 with Paramiko 2022-11-16 14:40:08 +01:00
apk.embedded_1.apk Add apk.embedded_1.apk test 2022-05-03 14:59:52 +00:00
bad-unicode-πÇÇ现代通用字-български-عربي1.apk rename test files to work round filename length limits 2017-11-27 16:57:30 +01:00
check-fdroid-apk use standard User-Agent in check-fdroid-apk 2018-01-26 10:18:41 +01:00
com.fake.IpaApp_1000000000001.ipa 🥔 add strapped IPA file and test for parse_ipa 2024-01-11 11:34:21 +01:00
config.py Drop stats/known_apks.txt 2024-10-31 09:20:26 +00:00
corrupt-featureGraphic.png update: log errors on bad graphics, and then ignore the file 2019-09-26 22:06:21 +02:00
dummy-keystore.jks added functions for storing/loading signer fingerprints to stats 2017-09-26 14:11:09 +02:00
dump_internal_metadata_format.py split out options from read_config() 2024-05-08 16:26:46 +02:00
funding-usernames.yaml Remove all mentions of Flattr 2024-09-23 07:59:08 +00:00
get-country-region-data.py lint: check syntax of countryCode: fields for mirrors 2024-01-09 09:32:37 +00:00
gradle-maven-blocks.yaml scanner: update maven repo regex 2024-03-12 07:57:11 +00:00
gradle-release-checksums.py Add support for Python 3.12 2023-12-07 18:15:05 -05:00
IsMD5Disabled.java tests: support Java setups where MD5 is not disabled by default 2017-09-19 20:16:08 +02:00
issue-1128-min-sdk-30-poc.apk also handle APKs entirely without JAR/v1 signatures 2024-05-07 16:22:59 +02:00
issue-1128-poc1.apk include @obfusk's proof-of-concept APKs in test suite 2024-05-07 16:22:59 +02:00
issue-1128-poc2.apk include @obfusk's proof-of-concept APKs in test suite 2024-05-07 16:22:59 +02:00
issue-1128-poc3a.apk include @obfusk's proof-of-concept APKs in test suite 2024-05-07 16:22:59 +02:00
issue-1128-poc3b.apk include @obfusk's proof-of-concept APKs in test suite 2024-05-07 16:22:59 +02:00
janus.apk update: reject APKs with invalid file sig, probably Janus exploits 2017-12-14 16:57:22 +01:00
key-tricks.py split out options from read_config() 2024-05-08 16:26:46 +02:00
keystore.jks tests: add test for correctly handling CVC when archiving 2019-12-24 17:35:54 +01:00
minimal_targetsdk_30_unsigned.apk publish: use apksigner for signing apks with targetSDK>=30 2020-09-09 18:09:28 +02:00
no_targetsdk_minsdk1_unsigned.apk fallback to minsdk when targetsdk isn't set 2020-09-14 14:12:18 +02:00
no_targetsdk_minsdk30_unsigned.apk fallback to minsdk when targetsdk isn't set 2020-09-14 14:12:18 +02:00
Norway_bouvet_europe_2.obf.zip use smallest possible valid .obf.zip file in tests 2020-12-03 21:48:37 +01:00
openssl-version-check-test.py Add timeout argument to requests.(get,post) 2022-09-05 17:50:10 +02:00
org.bitbucket.tickytacky.mirrormirror_1.apk update: allow_disabled_algorithms option to keep MD5 sigs in repo 2017-07-03 10:02:51 +02:00
org.bitbucket.tickytacky.mirrormirror_2.apk update: allow_disabled_algorithms option to keep MD5 sigs in repo 2017-07-03 10:02:51 +02:00
org.bitbucket.tickytacky.mirrormirror_3.apk update: allow_disabled_algorithms option to keep MD5 sigs in repo 2017-07-03 10:02:51 +02:00
org.bitbucket.tickytacky.mirrormirror_4.apk update: allow_disabled_algorithms option to keep MD5 sigs in repo 2017-07-03 10:02:51 +02:00
org.dyndns.fules.ck_20.apk use androguard if aapt isn't found 2017-05-04 23:35:17 +02:00
org.fdroid.fdroid_1019051.apk.json verify: handle corrupt verified.json 2025-01-20 09:48:20 +00:00
org.sajeg.fallingblocks_3.apk update: handle messed up namespaces in AndroidManifest.xml 2023-03-20 13:24:59 +00:00
parse-fdroiddata-mirror-config.py split out options from read_config() 2024-05-08 16:26:46 +02:00
refresh-SUSS_DEFAULT.py scanner: script to update default rules from SUSS 2024-01-25 11:51:22 +01:00
run-tests Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
SANAPPSI.RSA test APK signatures with a cert chain are parsed like apksigner 2024-05-07 16:22:59 +02:00
SANAPPSI.SF test APK signatures with a cert chain are parsed like apksigner 2024-05-07 16:22:59 +02:00
SpeedoMeterApp.main_1.apk update: do not crash with androguard when working with apps without icons 2018-03-12 17:55:45 +01:00
SystemWebView-repack.apk update: add test with APK for icon_id related exceptions 2021-10-01 16:44:14 +02:00
test_api.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_build.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_checkupdates.py checkupdates: only update app branches if metadata file changed 2024-11-21 12:15:14 +00:00
test_common.py match the full file name when looking for the v1 signature block 2025-01-15 14:45:35 +01:00
test_deploy.py tests: standardize on VerboseFalseOptions as mock 2024-11-20 10:46:21 +01:00
test_exception.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_github.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_gpgsign.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_gradlew-fdroid rename to test_gradlew-fdroid to match Python unittest naming 2024-11-19 20:27:29 +01:00
test_import_subcommand.py tests: standardize on VerboseFalseOptions as mock 2024-11-20 10:46:21 +01:00
test_index.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_init.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_install.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_lint.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_main.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_metadata.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_net.py test_net: figure out the proper IP protocol for localhost 2025-01-20 10:33:49 +00:00
test_nightly.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_publish.py tests: standardize on VerboseFalseOptions as mock 2024-11-20 10:46:21 +01:00
test_rewritemeta.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_scanner.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_signatures.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_signindex.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_update.py Refactor TestCase files into python modules 2024-11-20 10:37:52 +01:00
test_vcs.py tests: standardize on VerboseFalseOptions as mock 2024-11-20 10:46:21 +01:00
test_verify.py verify: handle corrupt verified.json 2025-01-20 09:48:20 +00:00
testcommon.py tests: standardize on VerboseFalseOptions as mock 2024-11-20 10:46:21 +01:00
urzip-badcert.apk include test cases for python getsig replacement 2014-11-07 09:20:33 +00:00
urzip-badsig.apk include test cases for python getsig replacement 2014-11-07 09:20:33 +00:00
urzip-release-unsigned.apk added test case for common.isApkDebuggable() 2014-12-14 13:25:20 +01:00
urzip-release.apk added test case for common.isApkDebuggable() 2014-12-14 13:25:20 +01:00
urzip.apk tests: try fdroid update after adding an APK to an existing repo 2014-06-04 21:54:55 -04:00
v2.only.sig_2.apk support APK Signature V2 when apksigner is installed 2019-02-01 09:17:56 +01:00