summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r--meta-openstack/recipes-devtools/python/python-swift/test.conf44
-rw-r--r--meta-openstack/recipes-devtools/python/python-swift_git.bb21
2 files changed, 63 insertions, 2 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-swift/test.conf b/meta-openstack/recipes-devtools/python/python-swift/test.conf
new file mode 100644
index 0000000..12ee253
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-swift/test.conf
@@ -0,0 +1,44 @@
1[func_test]
2auth_version = 2
3auth_host = localhost
4auth_port = 5000
5auth_ssl = no
6auth_prefix = /v2.0/
7
8# Primary functional test account (needs admin access to the account)
9account = %ADMIN_TENANT_NAME%
10username = %ADMIN_USER%
11password = %ADMIN_PASSWORD%
12
13# User on a second account (needs admin access to the account)
14account2 = %SERVICE_TENANT_NAME%
15username2 = %SERVICE_USER%
16password2 = %SERVICE_PASSWORD%
17
18# User on same account as first, but without admin access
19username3 = %DEMO_USER%
20password3 = %DEMO_PASSWORD%
21
22# Default constraints if not defined here, the test runner will try
23# to set them from /etc/swift/swift.conf. If that file isn't found,
24# the test runner will skip tests that depend on these values.
25# Note that the cluster must have "sane" values for the test suite to pass.
26max_file_size = 5242880
27max_meta_name_length = 128
28max_meta_value_length = 256
29max_meta_count = 90
30max_meta_overall_size = 4096
31max_object_name_length = 1024
32container_listing_limit = 10000
33account_listing_limit = 10000
34max_account_name_length = 256
35max_container_name_length = 256
36
37collate = C
38
39[unit_test]
40fake_syslog = False
41
42[probe_test]
43# check_server_timeout = 30
44# validate_rsync = false
diff --git a/meta-openstack/recipes-devtools/python/python-swift_git.bb b/meta-openstack/recipes-devtools/python/python-swift_git.bb
index d3419c5..6ab147d 100644
--- a/meta-openstack/recipes-devtools/python/python-swift_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-swift_git.bb
@@ -10,13 +10,14 @@ SRCNAME = "swift"
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ 10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
11 file://proxy-server.conf \ 11 file://proxy-server.conf \
12 file://dispersion.conf \ 12 file://dispersion.conf \
13 file://test.conf \
13" 14"
14 15
15SRCREV="2f3526c559fe53ce904b735a81dee6de46127176" 16SRCREV="2f3526c559fe53ce904b735a81dee6de46127176"
16PV="2013.2.2+git${SRCPV}" 17PV="2013.2.2+git${SRCPV}"
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
19inherit setuptools hosts identity 20inherit setuptools python-dir hosts identity
20 21
21do_install_append() { 22do_install_append() {
22 SWIFT_CONF_DIR=${D}${sysconfdir}/swift 23 SWIFT_CONF_DIR=${D}${sysconfdir}/swift
@@ -29,6 +30,7 @@ do_install_append() {
29 install -m 600 ${S}/etc/container-server.conf-sample ${SWIFT_CONF_DIR}/container-server.conf 30 install -m 600 ${S}/etc/container-server.conf-sample ${SWIFT_CONF_DIR}/container-server.conf
30 install -m 600 ${S}/etc/object-server.conf-sample ${SWIFT_CONF_DIR}/object-server.conf 31 install -m 600 ${S}/etc/object-server.conf-sample ${SWIFT_CONF_DIR}/object-server.conf
31 install -m 600 ${WORKDIR}/dispersion.conf ${SWIFT_CONF_DIR}/dispersion.conf 32 install -m 600 ${WORKDIR}/dispersion.conf ${SWIFT_CONF_DIR}/dispersion.conf
33 install -m 600 ${WORKDIR}/test.conf ${SWIFT_CONF_DIR}/test.conf
32 34
33 sed 's/^# bind_port =.*/bind_port = 6002/' -i ${SWIFT_CONF_DIR}/account-server.conf 35 sed 's/^# bind_port =.*/bind_port = 6002/' -i ${SWIFT_CONF_DIR}/account-server.conf
34 sed 's/^# user =.*/user = root/' -i ${SWIFT_CONF_DIR}/account-server.conf 36 sed 's/^# user =.*/user = root/' -i ${SWIFT_CONF_DIR}/account-server.conf
@@ -55,13 +57,28 @@ do_install_append() {
55 sed "s/%SERVICE_TENANT_NAME%/${SERVICE_TENANT_NAME}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf 57 sed "s/%SERVICE_TENANT_NAME%/${SERVICE_TENANT_NAME}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf
56 sed "s/%SERVICE_USER%/${SRCNAME}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf 58 sed "s/%SERVICE_USER%/${SRCNAME}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf
57 sed "s/%SERVICE_PASSWORD%/${SERVICE_PASSWORD}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf 59 sed "s/%SERVICE_PASSWORD%/${SERVICE_PASSWORD}/g" -i ${SWIFT_CONF_DIR}/dispersion.conf
60
61 sed "s/%ADMIN_TENANT_NAME%/admin/g" -i ${SWIFT_CONF_DIR}/test.conf
62 sed "s/%ADMIN_USER%/admin/g" -i ${SWIFT_CONF_DIR}/test.conf
63 sed "s/%ADMIN_PASSWORD%/${ADMIN_PASSWORD}/g" -i ${SWIFT_CONF_DIR}/test.conf
64 sed "s/%SERVICE_TENANT_NAME%/${SERVICE_TENANT_NAME}/g" -i ${SWIFT_CONF_DIR}/test.conf
65 sed "s/%SERVICE_USER%/${SRCNAME}/g" -i ${SWIFT_CONF_DIR}/test.conf
66 sed "s/%SERVICE_PASSWORD%/${SERVICE_PASSWORD}/g" -i ${SWIFT_CONF_DIR}/test.conf
67 sed "s/%DEMO_USER%/demo/g" -i ${SWIFT_CONF_DIR}/test.conf
68 sed "s/%DEMO_PASSWORD%/${ADMIN_PASSWORD}/g" -i ${SWIFT_CONF_DIR}/test.conf
69
70 cp -r test ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/
71 grep -rl '^from test' ${D}/${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}/test | xargs sed 's/^from test/from swift\.test/g' -i
58} 72}
59 73
60PACKAGES += "${SRCNAME}" 74PACKAGES += "${SRCNAME}-tests ${SRCNAME}"
61 75
62FILES_${PN} = "${libdir}/*\ 76FILES_${PN} = "${libdir}/*\
63" 77"
64 78
79FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/test.conf \
80"
81
65FILES_${SRCNAME} = "${bindir}/* \ 82FILES_${SRCNAME} = "${bindir}/* \
66 ${sysconfdir}/${SRCNAME}/* \ 83 ${sysconfdir}/${SRCNAME}/* \
67" 84"