CI: install pyjks as dependency for tests

This commit is contained in:
Marcus Hoffmann 2020-08-24 19:56:08 +02:00
parent a114c73c2d
commit d9a6bfb0a9
3 changed files with 9 additions and 3 deletions

View File

@ -6,7 +6,7 @@ variables:
test:
image: registry.gitlab.com/fdroid/ci-images-server:latest
script:
- $pip install -e .
- $pip install -e .[test]
- cd tests
- ./complete-ci-tests

View File

@ -52,7 +52,6 @@ def get_data_files():
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='fdroidserver',
version='1.2a',
description='F-Droid Server Tools',
@ -88,6 +87,9 @@ setup(name='fdroidserver',
'requests >= 2.5.2, != 2.11.0, != 2.12.2, != 2.18.0',
'yamllint',
],
extras_require={
'test': ['pyjks'],
},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',

View File

@ -11,7 +11,6 @@
#
import inspect
import jks, jks.util
import logging
import optparse
import os
@ -192,6 +191,11 @@ class PublishTest(unittest.TestCase):
self.assertEqual(len(randomappids), len(allaliases))
def test_create_key_if_not_existing(self):
try:
import jks
import jks.util
except ImportError:
self.skipTest("pyjks not installed")
common.config = {}
common.fill_config_defaults(common.config)
publish.config = common.config