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
This commit is contained in:
Hans-Christoph Steiner 2024-05-08 16:26:46 +02:00
parent 685efa23d4
commit 18f3acc32e
53 changed files with 317 additions and 265 deletions

View file

@ -60,7 +60,7 @@ import fdroidserver.metadata
import fdroidserver.update
from fdroidserver.common import CATEGORIES_CONFIG_NAME
from fdroidserver.looseversion import LooseVersion
from testcommon import TmpCwd, mkdtemp
from testcommon import TmpCwd, mkdtemp, parse_args_for_test
DONATION_FIELDS = ('Donate', 'Liberapay', 'OpenCollective')
@ -1207,7 +1207,7 @@ class UpdateTest(unittest.TestCase):
# Set up options
fdroidserver.common.options = Options
config = fdroidserver.common.read_config(fdroidserver.common.options)
config = fdroidserver.common.read_config()
if 'apksigner' not in config: # TODO remove me for buildserver-bullseye
self.skipTest('SKIPPING test_update_with_AllowedAPKSigningKeys, apksigner not installed!')
config['repo_keyalias'] = 'sova'
@ -2280,7 +2280,7 @@ if __name__ == "__main__":
default=False,
help="Spew out even more information than normal",
)
fdroidserver.common.options = parser.parse_args(['--verbose'])
parse_args_for_test(parser, sys.argv)
newSuite = unittest.TestSuite()
newSuite.addTest(unittest.makeSuite(UpdateTest))