forked from pool/python-mocket
- Run redis server on %check to fix redis tests that depends on a real
redis server running. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mocket?expand=0&rev=65
This commit is contained in:
parent
8ec143d534
commit
0cccfa3fb6
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 10:15:32 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Run redis server on %check to fix redis tests that depends on a real
|
||||
redis server running.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 12 10:42:12 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
|
@ -57,6 +57,7 @@ BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module sure}
|
||||
BuildRequires: %{python_module xxhash}
|
||||
BuildRequires: ca-certificates-mozilla
|
||||
BuildRequires: redis
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
@ -90,10 +91,15 @@ export SKIP_TRUE_HTTP=1
|
||||
# Ignore tests which are not supported on Python 3.6
|
||||
pytest_python3_ignore="--ignore tests/tests37 --ignore tests/tests38"
|
||||
%endif
|
||||
# Requires a running Redis server
|
||||
donttest="TrueRedisTestCase"
|
||||
|
||||
%{_sbindir}/redis-server --version | grep ' v=7\.' && redis7args="--enable-debug-command yes --enable-module-command yes"
|
||||
%{_sbindir}/redis-server --port 6379 --save "" $redis7args &
|
||||
victims="$!"
|
||||
trap "kill $victims || true" EXIT
|
||||
sleep 2
|
||||
|
||||
# Checks the ability to record a real request and response. Not available inside obs.
|
||||
donttest="$donttest or test_asyncio_record_replay"
|
||||
donttest="test_asyncio_record_replay"
|
||||
# The reference recording has different headers in this case
|
||||
%if %{pkg_vcmp python3-httpx < 0.23}
|
||||
donttest="$donttest or test_truesendall_with_dump_from_recording"
|
||||
|
Loading…
Reference in New Issue
Block a user