diff options
author | Keith Holman <Keith.Holman@windriver.com> | 2014-06-13 10:43:04 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-06-16 00:24:40 -0400 |
commit | 7af8f00fc7ff4f3301744c568c9b503b05aafbeb (patch) | |
tree | a991e21f593525c26e5da1946ce1b93d9145ef70 /meta-openstack/recipes-devtools/python/python-novaclient | |
parent | 3d1957e1be2d2eee52cb686e49dba1d013896d12 (diff) | |
download | meta-cloud-services-7af8f00fc7ff4f3301744c568c9b503b05aafbeb.tar.gz |
novaclient: fix path to test certificate
Novaclient contains a test that fails because it can't
find the path to the test certficate. This is because
the test is based off of running the test from the base
of the source tree. This fix changes the path to look
for the certificate from a relative path to the absolute
path allowing the test to be ran from any directory.
Signed-off-by: Keith Holman <Keith.Holman@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-novaclient')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch b/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch new file mode 100644 index 0000000..dff3edd --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From bdd853d38c7b14088d3e6368e298201c249ab004 Mon Sep 17 00:00:00 2001 | ||
2 | From: Keith Holman <Keith.Holman@windriver.com> | ||
3 | Date: Fri, 13 Jun 2014 09:54:41 -0400 | ||
4 | Subject: [PATCH] novaclient: specify full path to test certificate | ||
5 | |||
6 | The tests shipped with novaclient assume that the files | ||
7 | exist at the same location as are appear within the | ||
8 | source tree. The tests also assume that the test is ran | ||
9 | from the root of the tree. This causes a test to fail as | ||
10 | it can't find a test certificate used in one of the | ||
11 | tests. This patch fixes the affected test by putting in | ||
12 | an identifier that is replaced with the full path to the | ||
13 | certificate file. | ||
14 | |||
15 | Signed-off-by: Keith Holman <Keith.Holman@windriver.com> | ||
16 | --- | ||
17 | novaclient/tests/v1_1/test_servers.py | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/novaclient/tests/v1_1/test_servers.py b/novaclient/tests/v1_1/test_servers.py | ||
21 | index a48204c..443adc3 100644 | ||
22 | --- a/novaclient/tests/v1_1/test_servers.py | ||
23 | +++ b/novaclient/tests/v1_1/test_servers.py | ||
24 | @@ -462,7 +462,7 @@ class ServersTest(utils.TestCase): | ||
25 | |||
26 | def test_get_password(self): | ||
27 | s = cs.servers.get(1234) | ||
28 | - self.assertEqual(s.get_password('novaclient/tests/idfake.pem'), | ||
29 | + self.assertEqual(s.get_password('%PYTHON_SITEPACKAGES_DIR%/novaclient/tests/idfake.pem'), | ||
30 | b'FooBar123') | ||
31 | cs.assert_called('GET', '/servers/1234/os-server-password') | ||
32 | |||
33 | -- | ||
34 | 1.9.3 | ||
35 | |||