diff options
Diffstat (limited to 'meta-openstack/recipes-devtools')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-swift/test.conf | 44 | ||||
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-swift_git.bb | 21 |
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] | ||
| 2 | auth_version = 2 | ||
| 3 | auth_host = localhost | ||
| 4 | auth_port = 5000 | ||
| 5 | auth_ssl = no | ||
| 6 | auth_prefix = /v2.0/ | ||
| 7 | |||
| 8 | # Primary functional test account (needs admin access to the account) | ||
| 9 | account = %ADMIN_TENANT_NAME% | ||
| 10 | username = %ADMIN_USER% | ||
| 11 | password = %ADMIN_PASSWORD% | ||
| 12 | |||
| 13 | # User on a second account (needs admin access to the account) | ||
| 14 | account2 = %SERVICE_TENANT_NAME% | ||
| 15 | username2 = %SERVICE_USER% | ||
| 16 | password2 = %SERVICE_PASSWORD% | ||
| 17 | |||
| 18 | # User on same account as first, but without admin access | ||
| 19 | username3 = %DEMO_USER% | ||
| 20 | password3 = %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. | ||
| 26 | max_file_size = 5242880 | ||
| 27 | max_meta_name_length = 128 | ||
| 28 | max_meta_value_length = 256 | ||
| 29 | max_meta_count = 90 | ||
| 30 | max_meta_overall_size = 4096 | ||
| 31 | max_object_name_length = 1024 | ||
| 32 | container_listing_limit = 10000 | ||
| 33 | account_listing_limit = 10000 | ||
| 34 | max_account_name_length = 256 | ||
| 35 | max_container_name_length = 256 | ||
| 36 | |||
| 37 | collate = C | ||
| 38 | |||
| 39 | [unit_test] | ||
| 40 | fake_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" | |||
| 10 | SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ | 10 | SRC_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 | ||
| 15 | SRCREV="2f3526c559fe53ce904b735a81dee6de46127176" | 16 | SRCREV="2f3526c559fe53ce904b735a81dee6de46127176" |
| 16 | PV="2013.2.2+git${SRCPV}" | 17 | PV="2013.2.2+git${SRCPV}" |
| 17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 18 | 19 | ||
| 19 | inherit setuptools hosts identity | 20 | inherit setuptools python-dir hosts identity |
| 20 | 21 | ||
| 21 | do_install_append() { | 22 | do_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 | ||
| 60 | PACKAGES += "${SRCNAME}" | 74 | PACKAGES += "${SRCNAME}-tests ${SRCNAME}" |
| 61 | 75 | ||
| 62 | FILES_${PN} = "${libdir}/*\ | 76 | FILES_${PN} = "${libdir}/*\ |
| 63 | " | 77 | " |
| 64 | 78 | ||
| 79 | FILES_${SRCNAME}-tests = "${sysconfdir}/${SRCNAME}/test.conf \ | ||
| 80 | " | ||
| 81 | |||
| 65 | FILES_${SRCNAME} = "${bindir}/* \ | 82 | FILES_${SRCNAME} = "${bindir}/* \ |
| 66 | ${sysconfdir}/${SRCNAME}/* \ | 83 | ${sysconfdir}/${SRCNAME}/* \ |
| 67 | " | 84 | " |
