1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-07-02 07:20:37 +02:00

build: fix loading config files in tests

The new test case works with the default config.
This commit is contained in:
Hans-Christoph Steiner 2023-05-05 09:46:38 +02:00
parent 1e4e2489aa
commit 43b278b9d6
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA

View File

@ -611,7 +611,7 @@ class BuildTest(unittest.TestCase):
with open('config.yml', 'w') as fp:
yaml.dump({'sdk_path': sdk_path, 'keep_when_not_allowed': True}, fp)
os.chmod('config.yml', 0o600)
fdroidserver.common.build = fdroidserver.common.read_config()
fdroidserver.build.config = fdroidserver.common.read_config()
os.mkdir('metadata')
appid = 'info.guardianproject.checkey'
@ -703,13 +703,6 @@ class BuildTest(unittest.TestCase):
def test_failed_allowedapksigningkeys_are_not_in_unsigned(self):
os.chdir(self.testdir)
sdk_path = os.path.join(self.testdir, 'android-sdk')
self.create_fake_android_home(sdk_path)
with open('config.yml', 'w') as fp:
yaml.dump({'sdk_path': sdk_path}, fp)
os.chmod('config.yml', 0o600)
fdroidserver.common.build = fdroidserver.common.read_config()
os.mkdir('metadata')
appid = 'info.guardianproject.checkey'
metadata_file = os.path.join('metadata', appid + '.yml')