mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-10 17:20:29 +03:00
better error message in publish when repo_key is not set
This commit is contained in:
parent
e5acdee21e
commit
788c8f97fd
4 changed files with 42 additions and 19 deletions
|
|
@ -25,6 +25,7 @@ if localmodule not in sys.path:
|
|||
import fdroidserver.signindex
|
||||
import fdroidserver.common
|
||||
import fdroidserver.metadata
|
||||
from testcommon import TmpCwd
|
||||
from fdroidserver.exception import FDroidException
|
||||
|
||||
|
||||
|
|
@ -39,6 +40,20 @@ class CommonTest(unittest.TestCase):
|
|||
os.makedirs(self.tmpdir)
|
||||
os.chdir(self.basedir)
|
||||
|
||||
def test_assert_config_keystore(self):
|
||||
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
|
||||
with self.assertRaises(FDroidException):
|
||||
fdroidserver.common.assert_config_keystore({})
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
|
||||
c = {'repo_keyalias': 'localhost',
|
||||
'keystore': 'keystore.jks',
|
||||
'keystorepass': '12345',
|
||||
'keypass': '12345'}
|
||||
with open('keystore.jks', 'w'):
|
||||
pass
|
||||
fdroidserver.common.assert_config_keystore(c)
|
||||
|
||||
def _set_build_tools(self):
|
||||
build_tools = os.path.join(fdroidserver.common.config['sdk_path'], 'build-tools')
|
||||
if os.path.exists(build_tools):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue