Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist. - Add Xenial-Newton Amulet test definitions. - Add Yakkety-Newton Amulet test definitions. - Use the percona-cluster charm in tests instead of the mysql charm. Change-Id: I38cf4c134f0057ada305aa31926064117c7c3b8f
This commit is contained in:
parent
49947b0052
commit
0a0d778abd
8
Makefile
8
Makefile
@ -1,8 +0,0 @@
|
||||
#!/usr/bin/make
|
||||
LAYER_PATH := layers
|
||||
|
||||
clean:
|
||||
rm -Rf build .tox .testrepository
|
||||
|
||||
build: clean
|
||||
LAYER_PATH=$(LAYER_PATH) tox -e build
|
@ -42,9 +42,10 @@ class BarbicanBasicDeployment(OpenStackAmuletDeployment):
|
||||
self._deploy()
|
||||
|
||||
u.log.info('Waiting on extended status checks...')
|
||||
exclude_services = ['mysql', ]
|
||||
exclude_services = []
|
||||
self._auto_wait_for_status(exclude_services=exclude_services)
|
||||
|
||||
self.d.sentry.wait()
|
||||
self._initialize_tests()
|
||||
|
||||
def _add_services(self):
|
||||
@ -55,19 +56,21 @@ class BarbicanBasicDeployment(OpenStackAmuletDeployment):
|
||||
compatible with the local charm (e.g. stable or next).
|
||||
"""
|
||||
this_service = {'name': 'barbican'}
|
||||
other_services = [{'name': 'mysql'},
|
||||
{'name': 'rabbitmq-server'},
|
||||
{'name': 'keystone'}]
|
||||
other_services = [
|
||||
{'name': 'percona-cluster', 'constraints': {'mem': '3072M'}},
|
||||
{'name': 'rabbitmq-server'},
|
||||
{'name': 'keystone'}
|
||||
]
|
||||
super(BarbicanBasicDeployment, self)._add_services(
|
||||
this_service, other_services)
|
||||
|
||||
def _add_relations(self):
|
||||
"""Add all of the relations for the services."""
|
||||
relations = {
|
||||
'barbican:shared-db': 'mysql:shared-db',
|
||||
'barbican:shared-db': 'percona-cluster:shared-db',
|
||||
'barbican:amqp': 'rabbitmq-server:amqp',
|
||||
'barbican:identity-service': 'keystone:identity-service',
|
||||
'keystone:shared-db': 'mysql:shared-db',
|
||||
'keystone:shared-db': 'percona-cluster:shared-db',
|
||||
}
|
||||
super(BarbicanBasicDeployment, self)._add_relations(relations)
|
||||
|
||||
@ -84,9 +87,16 @@ class BarbicanBasicDeployment(OpenStackAmuletDeployment):
|
||||
'verbose': True,
|
||||
'keystone-api-version': str(keystone_version),
|
||||
}
|
||||
pxc_config = {
|
||||
'dataset-size': '25%',
|
||||
'max-connections': 1000,
|
||||
'root-password': 'ChangeMe123',
|
||||
'sst-password': 'ChangeMe123',
|
||||
}
|
||||
configs = {
|
||||
'keystone': keystone_config,
|
||||
'barbican': barbican_config,
|
||||
'percona-cluster': pxc_config,
|
||||
}
|
||||
super(BarbicanBasicDeployment, self)._configure_services(configs)
|
||||
|
||||
@ -94,7 +104,7 @@ class BarbicanBasicDeployment(OpenStackAmuletDeployment):
|
||||
"""Perform final initialization before tests get run."""
|
||||
# Access the sentries for inspecting service units
|
||||
self.barbican_sentry = self.d.sentry['barbican'][0]
|
||||
self.mysql_sentry = self.d.sentry['mysql'][0]
|
||||
self.pxc_sentry = self.d.sentry['percona-cluster'][0]
|
||||
self.keystone_sentry = self.d.sentry['keystone'][0]
|
||||
self.rabbitmq_sentry = self.d.sentry['rabbitmq-server'][0]
|
||||
u.log.debug('openstack release val: {}'.format(
|
||||
@ -103,7 +113,7 @@ class BarbicanBasicDeployment(OpenStackAmuletDeployment):
|
||||
self._get_openstack_release_string()))
|
||||
|
||||
keystone_ip = self.keystone_sentry.relation(
|
||||
'shared-db', 'mysql:shared-db')['private-address']
|
||||
'shared-db', 'percona-cluster:shared-db')['private-address']
|
||||
|
||||
# We need to auth either to v2.0 or v3 keystone
|
||||
if self._keystone_version == '2':
|
||||
|
12
src/tests/gate-basic-xenial-newton
Executable file
12
src/tests/gate-basic-xenial-newton
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""Amulet tests on a basic barbican deploy on xenial-newton for keystone v3.
|
||||
"""
|
||||
|
||||
from basic_deployment import BarbicanBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = BarbicanBasicDeployment(series='xenial', keystone_version=3,
|
||||
openstack='cloud:xenial-newton',
|
||||
source='cloud:xenial-updates/newton')
|
||||
deployment.run_tests()
|
10
src/tests/gate-basic-yakkety-newton
Normal file
10
src/tests/gate-basic-yakkety-newton
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""Amulet tests on a basic barbican deployment on yakkety-newton for keystone v2.
|
||||
"""
|
||||
|
||||
from basic_deployment import BarbicanBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = BarbicanBasicDeployment(series='yakkety', keystone_version=2)
|
||||
deployment.run_tests()
|
Loading…
Reference in New Issue
Block a user