python-neutronclient: Fix tests

Adding 0001-Be-explicit-about-the-identity-plugin-required-in-un.patch
fixes the unittests when updating os-client-config to 1.27.0

Change-Id: Ia67064f15dc3b30a748b6186ec5d3d03508ddcbb
This commit is contained in:
Thomas Bechtold
2017-05-24 07:04:50 +02:00
parent 4c7fd646d1
commit 6aa080df74
2 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
From 2e60acdff20a6170065d8ad073ef987d8dc643ef Mon Sep 17 00:00:00 2001
From: Armando Migliaccio <armamig@gmail.com>
Date: Mon, 1 May 2017 12:50:51 -0700
Subject: [PATCH] Be explicit about the identity plugin required in unit tests
This change fixes UT failures introduced by os-client-config===1.27.0
(and [1] in particular) that was masking the fact that these tests
were not specifying the required 'token' identity plugin.
[1] https://github.com/openstack/os-client-config/commit/e6755872ada4978f585bdf15edf623dbcf72c4ee
Change-Id: I9521a7e1bff39c1d25b998ca12c450890517fd2f
---
neutronclient/tests/unit/test_shell.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/neutronclient/tests/unit/test_shell.py b/neutronclient/tests/unit/test_shell.py
index 4e62d78..2ae8bdc 100644
--- a/neutronclient/tests/unit/test_shell.py
+++ b/neutronclient/tests/unit/test_shell.py
@@ -233,6 +233,7 @@ class ShellTest(testtools.TestCase):
options.update(base_options)
if options.get('os_token'):
+ options.update({'auth_type': 'token'})
options.update({'os_token': 'token', 'os_url': 'url'})
else:
options.update({'os_token': None, 'os_url': None})
--
2.13.0

View File

@@ -6,6 +6,8 @@ License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
Url: http://launchpad.net/%{name}
Source0: https://pypi.io/packages/source/p/%{name}/%{name}-%{version}.tar.gz
# https://review.openstack.org/#/c/461463/
Patch1: 0001-Be-explicit-about-the-identity-plugin-required-in-un.patch
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('cliff') }}
BuildRequires: {{ py2pkg('devel') }}
@@ -64,7 +66,7 @@ Client library and command line utility for interacting with OpenStack
Neutron's API.
%prep
%autosetup -n %{name}-%{version}
%autosetup -p1 -n %{name}-%{version}
%py_req_cleanup
%build