mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
skip fdroid import
test if gitlab is not available
This prevents CI build failures when gitlab is deploying or has other issues that might cause a 500.
This commit is contained in:
parent
89010a1ba5
commit
008b4a31eb
@ -5,6 +5,7 @@
|
|||||||
import inspect
|
import inspect
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
|
import requests
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
@ -30,6 +31,12 @@ class ImportTest(unittest.TestCase):
|
|||||||
fdroidserver.common.config = config
|
fdroidserver.common.config = config
|
||||||
|
|
||||||
url = 'https://gitlab.com/fdroid/fdroidclient'
|
url = 'https://gitlab.com/fdroid/fdroidclient'
|
||||||
|
r = requests.head(url)
|
||||||
|
if r.status_code != 200:
|
||||||
|
print("ERROR", url, 'unreachable (', r.status_code, ')')
|
||||||
|
print('Skipping ImportTest!')
|
||||||
|
return
|
||||||
|
|
||||||
app = fdroidserver.metadata.get_default_app_info()
|
app = fdroidserver.metadata.get_default_app_info()
|
||||||
app.UpdateCheckMode = "Tags"
|
app.UpdateCheckMode = "Tags"
|
||||||
root_dir, src_dir = import_proxy.get_metadata_from_url(app, url)
|
root_dir, src_dir = import_proxy.get_metadata_from_url(app, url)
|
||||||
|
Loading…
Reference in New Issue
Block a user