!2 Fix building for pytest update
From: @baizg1107 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
c0813118ad
29
0001-fix-build-for-pytest.patch
Normal file
29
0001-fix-build-for-pytest.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 2ecfbe1d82ef2bcb6bba3d9d8a71dcc8e7811021 Mon Sep 17 00:00:00 2001
|
||||||
|
From: baizg1107 <preloyalwhite@163.com>
|
||||||
|
Date: Tue, 12 Jan 2021 11:18:35 +0800
|
||||||
|
Subject: [PATCH] fix build for pytest
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/conftest.py | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/conftest.py b/tests/conftest.py
|
||||||
|
index c25e302..6a977ec 100644
|
||||||
|
--- a/tests/conftest.py
|
||||||
|
+++ b/tests/conftest.py
|
||||||
|
@@ -34,6 +34,11 @@ def pytest_addoption(parser):
|
||||||
|
|
||||||
|
def pytest_runtest_setup(item):
|
||||||
|
skip_servertest = item.config.getoption(SKIP_SERVERTEST)
|
||||||
|
- if skip_servertest and item.get_marker("servertest") is not None:
|
||||||
|
+ #pytest 4+
|
||||||
|
+ if hasattr(item, 'get_closest_marker'):
|
||||||
|
+ get_marker = item.get_closest_marker
|
||||||
|
+ else:
|
||||||
|
+ get_marker = item.get_marker
|
||||||
|
+ if skip_servertest and get_marker("servertest") is not None:
|
||||||
|
# args has --skip-servertests and test is marked as servertest
|
||||||
|
pytest.skip("Skip integration test")
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: custodia
|
Name: custodia
|
||||||
Version: 0.6.0
|
Version: 0.6.0
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: A tool for managing secrets other processes
|
Summary: A tool for managing secrets other processes
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://github.com/latchset/%{name}
|
URL: https://github.com/latchset/%{name}
|
||||||
@ -11,6 +11,8 @@ Source4: custodia@.socket
|
|||||||
Source5: custodia.tmpfiles.conf
|
Source5: custodia.tmpfiles.conf
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Patch0: 0001-fix-build-for-pytest.patch
|
||||||
|
|
||||||
BuildRequires: systemd python3-devel python3-jwcrypto >= 0.4.2
|
BuildRequires: systemd python3-devel python3-jwcrypto >= 0.4.2
|
||||||
BuildRequires: python3-requests python3-setuptools > 18 python3-coverage
|
BuildRequires: python3-requests python3-setuptools > 18 python3-coverage
|
||||||
BuildRequires: python3-pytest python3-docutils python3-systemd
|
BuildRequires: python3-pytest python3-docutils python3-systemd
|
||||||
@ -47,7 +49,7 @@ Custodia is modular, the configuration file controls how authentication,
|
|||||||
authorization, storage and API plugins are combined and exposed.
|
authorization, storage and API plugins are combined and exposed.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -128,5 +130,8 @@ exit 0
|
|||||||
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}-nspkg.pth
|
%{python3_sitelib}/%{name}-%{version}-py%{python3_version}-nspkg.pth
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 8 2021 baizhonggui <baizhonggui> 0.6.0-6
|
||||||
|
- Fix building for pytest
|
||||||
|
|
||||||
* Fri May 15 2020 Captain Wei <captain.a.wei@gmail.com> 0.6.0-5
|
* Fri May 15 2020 Captain Wei <captain.a.wei@gmail.com> 0.6.0-5
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user