summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-extended
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-11-16 22:49:01 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-25 15:25:38 -0500
commitb2cf21f9bacceace8abe3f80256e3a9cd141c5ae (patch)
tree460e6c54d149a9f4d364ea6d078b92ed2b91dfd2 /meta-openstack/recipes-extended
parent0f736029c73ae9b921ef67490d2086520e2e2c28 (diff)
downloadmeta-cloud-services-b2cf21f9bacceace8abe3f80256e3a9cd141c5ae.tar.gz
tempest: fix configuration for test execution
The initial integration of tempest didn't configure logging.conf or tempest.conf with the proper values for test execution. With this commit, we have a log configuration, passwords and other settings such that basic tests may be executed on target as follows: root@controller:/usr/lib/python2.7/site-packages# nosetests tempest/api To build the tests into the controller image, the following should be added to local.conf: OPENSTACK_CONTROLLER_EXTRA_INSTALL += "tempest" Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-extended')
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest/logging.conf2
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest/tempest.conf6
-rw-r--r--meta-openstack/recipes-extended/tempest/tempest_git.bb70
3 files changed, 37 insertions, 41 deletions
diff --git a/meta-openstack/recipes-extended/tempest/tempest/logging.conf b/meta-openstack/recipes-extended/tempest/tempest/logging.conf
index 3b468f1..3ab27ba 100644
--- a/meta-openstack/recipes-extended/tempest/tempest/logging.conf
+++ b/meta-openstack/recipes-extended/tempest/tempest/logging.conf
@@ -43,4 +43,4 @@ args=(sys.stdout,)
43format=%(name)s: %(levelname)s: %(message)s 43format=%(name)s: %(levelname)s: %(message)s
44 44
45[formatter_tests] 45[formatter_tests]
46class = tempest.common.log.TestsFormatter 46# class = tempest.common.log.TestsFormatter
diff --git a/meta-openstack/recipes-extended/tempest/tempest/tempest.conf b/meta-openstack/recipes-extended/tempest/tempest/tempest.conf
index aebda69..1406c5d 100644
--- a/meta-openstack/recipes-extended/tempest/tempest/tempest.conf
+++ b/meta-openstack/recipes-extended/tempest/tempest/tempest.conf
@@ -35,7 +35,7 @@ region = RegionOne
35# This should be the username of a user WITHOUT administrative privileges 35# This should be the username of a user WITHOUT administrative privileges
36username = demo 36username = demo
37# The above non-administrative user's password 37# The above non-administrative user's password
38password = secret 38password = %ADMIN_PASSWORD%
39# The above non-administrative user's tenant name 39# The above non-administrative user's tenant name
40tenant_name = demo 40tenant_name = demo
41 41
@@ -43,14 +43,14 @@ tenant_name = demo
43# administrative privileges 43# administrative privileges
44alt_username = alt_demo 44alt_username = alt_demo
45# The above non-administrative user's password 45# The above non-administrative user's password
46alt_password = secret 46alt_password = %ADMIN_PASSWORD%
47# The above non-administrative user's tenant name 47# The above non-administrative user's tenant name
48alt_tenant_name = alt_demo 48alt_tenant_name = alt_demo
49 49
50# This should be the username of a user WITH administrative privileges 50# This should be the username of a user WITH administrative privileges
51admin_username = admin 51admin_username = admin
52# The above administrative user's password 52# The above administrative user's password
53admin_password = secret 53admin_password = %ADMIN_PASSWORD%
54# The above administrative user's tenant name 54# The above administrative user's tenant name
55admin_tenant_name = admin 55admin_tenant_name = admin
56 56
diff --git a/meta-openstack/recipes-extended/tempest/tempest_git.bb b/meta-openstack/recipes-extended/tempest/tempest_git.bb
index 250e541..3e37640 100644
--- a/meta-openstack/recipes-extended/tempest/tempest_git.bb
+++ b/meta-openstack/recipes-extended/tempest/tempest_git.bb
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
7PR = "r0" 7PR = "r0"
8SRCNAME = "tempest" 8SRCNAME = "tempest"
9 9
10inherit setuptools identity hosts
11
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ 12SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
11 file://tempest.conf \ 13 file://tempest.conf \
12 file://logging.conf \ 14 file://logging.conf \
@@ -37,57 +39,51 @@ do_install_append() {
37 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/tempest.conf 39 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" -i ${WORKDIR}/tempest.conf
38 40
39 install -d ${TEMPEST_CONF_DIR} 41 install -d ${TEMPEST_CONF_DIR}
42 install -d ${TEMPEST_CONF_DIR}/tests
40 install -m 600 ${WORKDIR}/tempest.conf ${TEMPEST_CONF_DIR} 43 install -m 600 ${WORKDIR}/tempest.conf ${TEMPEST_CONF_DIR}
41 install -m 600 ${WORKDIR}/logging.conf ${TEMPEST_CONF_DIR} 44 install -m 600 ${WORKDIR}/logging.conf ${TEMPEST_CONF_DIR}
42 install -m 600 ${TEMPLATE_CONF_DIR}/*.yaml ${TEMPEST_CONF_DIR} 45 install -m 600 ${TEMPLATE_CONF_DIR}/*.yaml ${TEMPEST_CONF_DIR}
43}
44 46
45pkg_postinst_${SRCNAME}() { 47 # relocate tests to somewhere less cryptic, which means we pull them out of
46 if [ "x$D" != "x" ]; then 48 # site-packages and put them in /etc/tempest/tests/
47 exit 1 49 for t in api cli scenario stress thirdparty; do
48 fi 50 ln -s ${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/$t ${TEMPEST_CONF_DIR}/tests/
49 51 done
50 # This is to make sure postgres is configured and running
51 if ! pidof postmaster > /dev/null; then
52 /etc/init.d/postgresql-init
53 /etc/init.d/postgresql start
54 sleep 5
55 fi
56} 52}
57 53
58inherit setuptools identity hosts 54PACKAGES =+ "${SRCNAME}-tests"
59 55
60# PACKAGES += "${SRCNAME}-common ${SRCNAME}-api ${SRCNAME}-api-cfn ${SRCNAME}-engine" 56FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/tests/*"
61 57
62FILES_${PN} = "${libdir}/* \ 58FILES_${PN} = "${libdir}/* \
63 ${sysconfdir}/* \ 59 ${sysconfdir}/* \
64" 60"
65
66RDEPENDS_${PN} += " \ 61RDEPENDS_${PN} += " \
67 python-testrepository \ 62 ${SRCNAME}-tests \
68 python-fixtures \ 63 python-testrepository \
69 python-keyring \ 64 python-fixtures \
65 python-keyring \
70 python-glanceclient \ 66 python-glanceclient \
71 python-keystoneclient \ 67 python-keystoneclient \
72 python-swiftclient \ 68 python-swiftclient \
73 python-novaclient \ 69 python-novaclient \
74 python-cinderclient \ 70 python-cinderclient \
75 python-heatclient \ 71 python-heatclient \
76 python-pbr \ 72 python-pbr \
77 python-anyjson \ 73 python-anyjson \
78 python-nose \ 74 python-nose \
79 python-httplib2 \ 75 python-httplib2 \
80 python-jsonschema \ 76 python-jsonschema \
81 python-testtools \ 77 python-testtools \
82 python-lxml \ 78 python-lxml \
83 python-boto \ 79 python-boto \
84 python-paramiko \ 80 python-paramiko \
85 python-netaddr \ 81 python-netaddr \
86 python-testresources \ 82 python-testresources \
87 python-oslo.config \ 83 python-oslo.config \
88 python-eventlet \ 84 python-eventlet \
89 python-six \ 85 python-six \
90 python-iso8601 \ 86 python-iso8601 \
91 python-mimeparse \ 87 python-mimeparse \
92 " 88 "
93 89