Implement tests for nova-lxd hypervisor
This commit implements automated testing for the nova-lxd hypervisor. Change-Id: Ib49312dcb8fb5bd553369819cfd551137ff1c19e
This commit is contained in:
@@ -33,7 +33,7 @@ pip install tox
|
|||||||
|
|
||||||
# run through each tox env and execute the test
|
# run through each tox env and execute the test
|
||||||
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
for tox_env in $(awk -F= '/envlist/ {print $2}' tox.ini | sed 's/,/ /g'); do
|
||||||
if [ "${tox_env}" != "functional" ]; then
|
if [[ "${tox_env}" != "functional" ]] && [[ $tox_env != func_* ]]; then
|
||||||
tox -e ${tox_env}
|
tox -e ${tox_env}
|
||||||
elif [ "${tox_env}" == "functional" ]; then
|
elif [ "${tox_env}" == "functional" ]; then
|
||||||
if ${FUNCTIONAL_TEST}; then
|
if ${FUNCTIONAL_TEST}; then
|
||||||
|
|||||||
28
tests/test-vars-lxd.yml
Normal file
28
tests/test-vars-lxd.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
# Copyright 2016, Walmart Stores, Inc.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
nova_virt_type: lxc
|
||||||
|
|
||||||
|
tempest_img_url: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz"
|
||||||
|
tempest_img_disk_format: raw
|
||||||
|
tempest_image_file: "cirros-0.3.4-x86_64-lxc.tar.gz"
|
||||||
|
tempest_img_name: "cirros"
|
||||||
|
tempest_images:
|
||||||
|
- url: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz"
|
||||||
|
sha256: "e8172c603fad47f4c95e67bd2751c2977e07164c9ebdfcf3f9c1d7ff598ed217"
|
||||||
|
|
||||||
|
tempest_tempest_conf_overrides:
|
||||||
|
'compute-feature-enabled':
|
||||||
|
'config_drive': 'false'
|
||||||
@@ -62,6 +62,7 @@ keystone_service_internalurl: "{{ keystone_service_internaluri }}/v3"
|
|||||||
keystone_service_password: "secrete"
|
keystone_service_password: "secrete"
|
||||||
keystone_service_region: RegionOne
|
keystone_service_region: RegionOne
|
||||||
keystone_venv_tag: "testing"
|
keystone_venv_tag: "testing"
|
||||||
|
lxd_trust_password: "SuperSecrete"
|
||||||
memcached_encryption_key: "secrete"
|
memcached_encryption_key: "secrete"
|
||||||
memcached_servers: 127.0.0.1
|
memcached_servers: 127.0.0.1
|
||||||
neutron_container_mysql_password: SuperSecrete
|
neutron_container_mysql_password: SuperSecrete
|
||||||
@@ -116,7 +117,6 @@ nova_service_user_domain_id: default
|
|||||||
nova_service_user_name: nova
|
nova_service_user_name: nova
|
||||||
nova_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
nova_bin: "/openstack/venvs/nova-{{ nova_venv_tag }}/bin"
|
||||||
nova_venv_tag: "testing"
|
nova_venv_tag: "testing"
|
||||||
nova_virt_type: qemu
|
|
||||||
openrc_os_auth_url: "http://127.0.0.1:5000/v3"
|
openrc_os_auth_url: "http://127.0.0.1:5000/v3"
|
||||||
openrc_os_domain_name: "Default"
|
openrc_os_domain_name: "Default"
|
||||||
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
openrc_os_password: "{{ keystone_auth_admin_password }}"
|
||||||
|
|||||||
27
tox.ini
27
tox.ini
@@ -146,12 +146,20 @@ commands =
|
|||||||
ansible-lint {toxinidir}
|
ansible-lint {toxinidir}
|
||||||
|
|
||||||
|
|
||||||
[testenv:functional]
|
[testenv:func_base]
|
||||||
# NOTE(odyssey4me): this target does not use constraints because
|
# NOTE(odyssey4me): this target does not use constraints because
|
||||||
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||||
# drop the install_command.
|
# drop the install_command.
|
||||||
install_command =
|
install_command =
|
||||||
pip install -U --force-reinstall {opts} {packages}
|
pip install -U --force-reinstall {opts} {packages}
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:functional]
|
||||||
|
# NOTE(odyssey4me): this target does not use constraints because
|
||||||
|
# it doesn't work in OpenStack-CI yet. Once that's fixed, we can
|
||||||
|
# drop the install_command.
|
||||||
|
install_command =
|
||||||
|
{[testenv:func_base]install_command}
|
||||||
deps =
|
deps =
|
||||||
{[testenv:ansible]deps}
|
{[testenv:ansible]deps}
|
||||||
setenv =
|
setenv =
|
||||||
@@ -164,6 +172,23 @@ commands =
|
|||||||
{toxinidir}/tests/test.yml -vvvv
|
{toxinidir}/tests/test.yml -vvvv
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:func_lxd]
|
||||||
|
# NOTE(michaelgugino): this target tests nova with lxd
|
||||||
|
install_command =
|
||||||
|
{[testenv:func_base]install_command}
|
||||||
|
deps =
|
||||||
|
{[testenv:ansible]deps}
|
||||||
|
setenv =
|
||||||
|
{[testenv:ansible]setenv}
|
||||||
|
commands =
|
||||||
|
{[testenv:ansible]commands}
|
||||||
|
ansible-playbook -i {toxinidir}/tests/inventory \
|
||||||
|
-e @{toxinidir}/tests/test-vars-lxd.yml \
|
||||||
|
-e "rolename={toxinidir}" \
|
||||||
|
-e "install_test_packages=True" \
|
||||||
|
{toxinidir}/tests/test.yml -vvvv
|
||||||
|
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
deps =
|
deps =
|
||||||
{[testenv:ansible]deps}
|
{[testenv:ansible]deps}
|
||||||
|
|||||||
Reference in New Issue
Block a user