Merge "Update ovsdbapp to 1.3.0"
This commit is contained in:
@@ -0,0 +1,38 @@
|
|||||||
|
From 48ee1008f59eed95cbca7a8b1b3630ddbffdaae5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Terry Wilson <twilson@redhat.com>
|
||||||
|
Date: Fri, 24 Jul 2020 16:42:17 -0500
|
||||||
|
Subject: [PATCH] Fix thread/threading change in unit test
|
||||||
|
|
||||||
|
This unit test was not updated when the thread/threading name
|
||||||
|
change happened. This fixes the unit test when eventlet is
|
||||||
|
installed.
|
||||||
|
|
||||||
|
Change-Id: I0e0da83187190c7145bb01f77daf22a43868115c
|
||||||
|
Closes-bug: #1875678
|
||||||
|
---
|
||||||
|
ovsdbapp/tests/unit/test_api.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ovsdbapp/tests/unit/test_api.py b/ovsdbapp/tests/unit/test_api.py
|
||||||
|
index 897a955..8bb7921 100644
|
||||||
|
--- a/ovsdbapp/tests/unit/test_api.py
|
||||||
|
+++ b/ovsdbapp/tests/unit/test_api.py
|
||||||
|
@@ -44,12 +44,12 @@ except ImportError:
|
||||||
|
class GreenThreadingFixture(fixtures.Fixture):
|
||||||
|
def _setUp(self):
|
||||||
|
if 'eventlet' in sys.modules:
|
||||||
|
- self._orig = api.thread.get_ident
|
||||||
|
- api.thread.get_ident = thread.get_ident
|
||||||
|
+ self._orig = api.threading.get_ident
|
||||||
|
+ api.threading.get_ident = thread.get_ident
|
||||||
|
self.addCleanup(self.cleanup)
|
||||||
|
|
||||||
|
def cleanup(self):
|
||||||
|
- api.thread.get_ident = self._orig
|
||||||
|
+ api.threading.get_ident = self._orig
|
||||||
|
|
||||||
|
|
||||||
|
class FakeTransaction(object):
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
@@ -1,6 +1,6 @@
|
|||||||
%define with_tests 1
|
%define with_tests 1
|
||||||
{% set pypi_name = 'ovsdbapp' %}
|
{% set pypi_name = 'ovsdbapp' %}
|
||||||
{% set upstream_version = upstream_version('1.2.0') %}
|
{% set upstream_version = upstream_version('1.3.0') %}
|
||||||
{% set rpm_release = '1' %}
|
{% set rpm_release = '1' %}
|
||||||
{% set source = url_pypi() %}
|
{% set source = url_pypi() %}
|
||||||
Name: {{ py2name() }}
|
Name: {{ py2name() }}
|
||||||
@@ -11,6 +11,8 @@ License: {{ license('Apache-2.0') }}
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://launchpad.net/{{ pypi_name }}
|
URL: https://launchpad.net/{{ pypi_name }}
|
||||||
Source0: {{ source }}
|
Source0: {{ source }}
|
||||||
|
# From https://review.opendev.org/#/c/743001/
|
||||||
|
Patch1: 0001-Fix-thread-threading-change-in-unit-test.patch
|
||||||
BuildRequires: openstack-macros
|
BuildRequires: openstack-macros
|
||||||
BuildRequires: {{ py3('fixtures') }}
|
BuildRequires: {{ py3('fixtures') }}
|
||||||
BuildRequires: {{ py3('netaddr') }}
|
BuildRequires: {{ py3('netaddr') }}
|
||||||
@@ -65,7 +67,7 @@ rm -rf doc/build/html/.{doctrees,buildinfo}
|
|||||||
|
|
||||||
%if 0%{?with_tests}
|
%if 0%{?with_tests}
|
||||||
%check
|
%check
|
||||||
OS_TEST_PATH=./ovsdbapp/tests/unit python3 -m stestr.cli run
|
OS_TEST_PATH=./ovsdbapp/tests/unit PYTHONPATH=. python3 -m stestr.cli run
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n {{ py2name(py_versions='py3') }}
|
%files -n {{ py2name(py_versions='py3') }}
|
||||||
|
Reference in New Issue
Block a user