summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient/novaclient-specify-full-path-to-test-certificate.patch35
-rw-r--r--meta-openstack/recipes-devtools/python/python-novaclient_git.bb4
2 files changed, 39 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 @@
1From bdd853d38c7b14088d3e6368e298201c249ab004 Mon Sep 17 00:00:00 2001
2From: Keith Holman <Keith.Holman@windriver.com>
3Date: Fri, 13 Jun 2014 09:54:41 -0400
4Subject: [PATCH] novaclient: specify full path to test certificate
5
6The tests shipped with novaclient assume that the files
7exist at the same location as are appear within the
8source tree. The tests also assume that the test is ran
9from the root of the tree. This causes a test to fail as
10it can't find a test certificate used in one of the
11tests. This patch fixes the affected test by putting in
12an identifier that is replaced with the full path to the
13certificate file.
14
15Signed-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
20diff --git a/novaclient/tests/v1_1/test_servers.py b/novaclient/tests/v1_1/test_servers.py
21index 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--
341.9.3
35
diff --git a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
index 9d114d2..3bb3aac 100644
--- a/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-novaclient_git.bb
@@ -9,6 +9,7 @@ PR = "r0"
9SRC_URI = "\ 9SRC_URI = "\
10 git://github.com/openstack/python-novaclient.git;branch=master \ 10 git://github.com/openstack/python-novaclient.git;branch=master \
11 file://fix_novaclient_memory_leak.patch \ 11 file://fix_novaclient_memory_leak.patch \
12 file://novaclient-specify-full-path-to-test-certificate.patch \
12 " 13 "
13 14
14PV="2.16.0+git${SRCPV}" 15PV="2.16.0+git${SRCPV}"
@@ -36,6 +37,9 @@ PACKAGECONFIG[bash-completion] = ",,bash-completion,bash-completion ${BPN}-bash-
36do_install_append() { 37do_install_append() {
37 install -d ${D}/${sysconfdir}/bash_completion.d 38 install -d ${D}/${sysconfdir}/bash_completion.d
38 install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d 39 install -m 664 ${S}/tools/nova.bash_completion ${D}/${sysconfdir}/bash_completion.d
40
41 sed -e "s:%PYTHON_SITEPACKAGES_DIR%:${PYTHON_SITEPACKAGES_DIR}:g" \
42 -i ${D}/${PYTHON_SITEPACKAGES_DIR}/novaclient/tests/v1_1/test_servers.py
39} 43}
40 44
41PACKAGES =+ "${BPN}-bash-completion" 45PACKAGES =+ "${BPN}-bash-completion"