forked from pool/python-gcsfs
Accepting request 986389 from home:bnavigator:branches:devel:languages:python:aws
- Enable the test suite with fake-gcs-server running OBS-URL: https://build.opensuse.org/request/show/986389 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gcsfs?expand=0&rev=19
This commit is contained in:
parent
29e390b69f
commit
b52f860edb
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jul 2 18:49:11 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Enable the test suite with fake-gcs-server running
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jun 29 10:18:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Wed Jun 29 10:18:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
# the test suite moved to a docker simulator which we cannot run inside an obs environment
|
|
||||||
%bcond_with fulltest
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
Name: python-gcsfs
|
Name: python-gcsfs
|
||||||
Version: 2022.5.0
|
Version: 2022.5.0
|
||||||
@ -44,9 +42,7 @@ Recommends: python-gcsfs-fuse = %{version}
|
|||||||
Suggests: python-crcmod
|
Suggests: python-crcmod
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
# always import in order to detect dependency breakages at build time
|
|
||||||
BuildRequires: %{python_module aiohttp}
|
BuildRequires: %{python_module aiohttp}
|
||||||
BuildRequires: %{python_module black}
|
|
||||||
BuildRequires: %{python_module click}
|
BuildRequires: %{python_module click}
|
||||||
BuildRequires: %{python_module decorator > 4.1.2}
|
BuildRequires: %{python_module decorator > 4.1.2}
|
||||||
BuildRequires: %{python_module fsspec == %{version}}
|
BuildRequires: %{python_module fsspec == %{version}}
|
||||||
@ -56,8 +52,10 @@ BuildRequires: %{python_module google-api-python-client}
|
|||||||
BuildRequires: %{python_module google-auth >= 1.2}
|
BuildRequires: %{python_module google-auth >= 1.2}
|
||||||
BuildRequires: %{python_module google-auth-oauthlib}
|
BuildRequires: %{python_module google-auth-oauthlib}
|
||||||
BuildRequires: %{python_module google-cloud-storage}
|
BuildRequires: %{python_module google-cloud-storage}
|
||||||
|
BuildRequires: %{python_module pytest-timeout}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
|
BuildRequires: fake-gcs-server
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -87,15 +85,21 @@ sed -i 's/--color=yes//' setup.cfg
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# The full test suite requires to start a docker container via fake-gcs-server
|
# https://github.com/fsspec/gcsfs/blob/main/docs/source/developer.rst
|
||||||
# see https://github.com/fsspec/gcsfs/blob/main/docs/source/developer.rst
|
fake-gcs-server \
|
||||||
# and the gcs fixtures in conftest.py
|
-backend memory \
|
||||||
|
-scheme http \
|
||||||
|
-public-host http://localhost:4443 \
|
||||||
|
-external-url http://localhost:4443 \
|
||||||
|
>$PWD/fake-gcs-server.stdout 2>$PWD/fake-gcs-server.stderr &
|
||||||
|
trap "jobs; kill %1 || true" EXIT
|
||||||
|
export STORAGE_EMULATOR_HOST=http://localhost:4443
|
||||||
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json
|
export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json
|
||||||
%if %{with fulltest}
|
# Don't test fuse, it hangs on mounting inside obs
|
||||||
%pytest -rfEs
|
donttest="test_fuse"
|
||||||
%else
|
# finds an existing path on the non-first multiflavor test runs"
|
||||||
%pytest -rfEs -k test_checkers
|
donttest+=" or test_mkdir_with_path"
|
||||||
%endif
|
%pytest -rfEs -k "not ($donttest)"
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user