Amulet test fixes:

* Makefile: Only run precise-icehouse and trusty-icehouse tests by default
    and increase test timeout
  * t/00-setup: Add more required dependencies
  * t/README: Mention charm-tools dependency
  * t/basic_deployment.py:
    - Specify unstable charm deployment
    - Use dicts in add_services
This commit is contained in:
Corey Bryant 2014-09-27 18:15:47 +00:00
parent 0e6462f874
commit e4997e2eb8
4 changed files with 22 additions and 12 deletions

View File

@ -10,7 +10,8 @@ test:
# coreycb note: The -v should only be temporary until Amulet sends # coreycb note: The -v should only be temporary until Amulet sends
# raise_status() messages to stderr: # raise_status() messages to stderr:
# https://bugs.launchpad.net/amulet/+bug/1320357 # https://bugs.launchpad.net/amulet/+bug/1320357
@juju test -v -p AMULET_HTTP_PROXY @juju test -v -p AMULET_HTTP_PROXY --timeout 900 \
00-setup 14-basic-precise-icehouse 15-basic-trusty-icehouse
bin/charm_helpers_sync.py: bin/charm_helpers_sync.py:
@mkdir -p bin @mkdir -p bin

View File

@ -4,5 +4,7 @@ set -ex
sudo add-apt-repository --yes ppa:juju/stable sudo add-apt-repository --yes ppa:juju/stable
sudo apt-get update --yes sudo apt-get update --yes
sudo apt-get install --yes python-amulet sudo apt-get install --yes python-amulet \
sudo apt-get install --yes python-keystoneclient python-keystoneclient \
python-glanceclient \
python-novaclient

View File

@ -1,6 +1,12 @@
This directory provides Amulet tests that focus on verification of ceph This directory provides Amulet tests that focus on verification of ceph
deployments. deployments.
In order to run tests, you'll need charm-tools installed (in addition to
juju, of course):
sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install charm-tools
If you use a web proxy server to access the web, you'll need to set the If you use a web proxy server to access the web, you'll need to set the
AMULET_HTTP_PROXY environment variable to the http URL of the proxy server. AMULET_HTTP_PROXY environment variable to the http URL of the proxy server.

View File

@ -17,9 +17,9 @@ u = OpenStackAmuletUtils(ERROR)
class CephBasicDeployment(OpenStackAmuletDeployment): class CephBasicDeployment(OpenStackAmuletDeployment):
"""Amulet tests on a basic ceph deployment.""" """Amulet tests on a basic ceph deployment."""
def __init__(self, series=None, openstack=None, source=None): def __init__(self, series=None, openstack=None, source=None, stable=False):
"""Deploy the entire test environment.""" """Deploy the entire test environment."""
super(CephBasicDeployment, self).__init__(series, openstack, source) super(CephBasicDeployment, self).__init__(series, openstack, source, stable)
self._add_services() self._add_services()
self._add_relations() self._add_relations()
self._configure_services() self._configure_services()
@ -29,14 +29,15 @@ class CephBasicDeployment(OpenStackAmuletDeployment):
def _add_services(self): def _add_services(self):
"""Add services """Add services
Add the services that we're testing, including the number of units, Add the services that we're testing, where ceph is local,
where ceph is local, and mysql and cinder are from the charm and the rest of the service are from lp branches that are
store. compatible with the local charm (e.g. stable or next).
""" """
this_service = ('ceph', 3) this_service = {'name': 'ceph', 'units': 3}
other_services = [('mysql', 1), ('keystone', 1), other_services = [{'name': 'mysql'}, {'name': 'keystone'},
('rabbitmq-server', 1), ('nova-compute', 1), {'name': 'rabbitmq-server'},
('glance', 1), ('cinder', 1)] {'name': 'nova-compute'},
{'name': 'glance'}, {'name': 'cinder'}]
super(CephBasicDeployment, self)._add_services(this_service, super(CephBasicDeployment, self)._add_services(this_service,
other_services) other_services)