[checkupdates] Exit 1 in case of errors

This commit is contained in:
Jochen Sprickerhof 2021-07-27 21:06:34 +02:00
parent e19a66bec6
commit a2db8f4a62
3 changed files with 25 additions and 11 deletions

View file

@ -65,7 +65,8 @@ class CheckupdatesTest(unittest.TestCase):
):
with mock.patch('fdroidserver.metadata.write_metadata', mock.Mock()):
with mock.patch('subprocess.call', lambda cmd: 0):
fdroidserver.checkupdates.checkupdates_app(app)
with self.assertRaises(FDroidException):
fdroidserver.checkupdates.checkupdates_app(app)
build = app['Builds'][-1]
self.assertEqual(build.versionName, '1.1.9')
self.assertEqual(build.commit, '1.1.9')

View file

@ -688,7 +688,7 @@ LOCAL_COPY_DIR=`create_test_dir`/fdroid
mkdir -p $LOCAL_COPY_DIR/repo
echo "local_copy_dir: $LOCAL_COPY_DIR" >> config.yml
$fdroid checkupdates --allow-dirty
$fdroid checkupdates --allow-dirty || true
which gpg && $fdroid gpgsign
$fdroid lint
$fdroid readmeta