checkupdates: only run tests on GNU/Linux

checkupdates is only ever run in production on Debian and it often fails
elsewhere.

https://gitlab.com/fdroid/fdroidserver/-/jobs/12307572200
This commit is contained in:
Hans-Christoph Steiner
2025-12-03 18:39:10 +01:00
parent add4225fc3
commit 8362108ec1

View File

@@ -2,7 +2,6 @@
import git
import os
import platform
import shutil
import tempfile
import time
@@ -17,6 +16,10 @@ import fdroidserver.checkupdates
basedir = Path(__file__).parent
@unittest.skipUnless(
os.path.exists('/usr/bin/dpkg'), # easy test for "Debian-ish"
'checkupdates is only ever run in production on Debian.',
)
class CheckupdatesTest(unittest.TestCase):
'''fdroidserver/checkupdates.py'''
@@ -491,10 +494,6 @@ class CheckupdatesTest(unittest.TestCase):
fdroidserver.checkupdates.main()
sys_exit.assert_not_called()
@unittest.skipIf(
platform.system() == 'Darwin',
'It is difficult to configure the base system for this test.',
)
def test_get_upstream_main_branch(self):
os.chdir(self.testdir.name)
testvalue = 'foo'