Always disable network tests

mock (by default) and koji builds never have network access, but testing
that capability through a DNS resolution is not always accurate.
Forcefully disable all network tests to avoid unnecessary build failures.
This commit is contained in:
Yaakov Selkowitz 2024-02-12 12:27:05 -05:00
parent 11976244b0
commit 5264302f61
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,12 @@
diff -up ./test/utils.py.orig ./test/utils.py
--- ./test/utils.py.orig 2024-02-12 12:22:29.272147056 -0500
+++ ./test/utils.py 2024-02-12 12:23:45.876659120 -0500
@@ -50,7 +50,7 @@ except socket.gaierror:
has_network = False
requires_network = pytest.mark.skipif(
- not has_network,
+ True,
reason='Requires network')
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:

View File

@ -13,6 +13,10 @@ Patch0: python-pygit2-transfer-size.patch
# higher contain the patches needed for Python >= 3.12.
# Remove when cffi >= 1.16.0 is available on all releases with Python 3.12.
Patch: python-pygit2-cffiver.patch
# mock (by default) and koji builds never have network access, but testing
# that capability through a DNS resolution is not always accurate.
# Forcefully disable all network tests to avoid unnecessary build failures.
Patch: python-pygit2-network-tests.patch
BuildRequires: make
BuildRequires: gcc