diff --git a/Makefile b/Makefile deleted file mode 100644 index 479fd6b..0000000 --- a/Makefile +++ /dev/null @@ -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 diff --git a/src/tests/basic_deployment.py b/src/tests/basic_deployment.py index bd750cc..5172a17 100644 --- a/src/tests/basic_deployment.py +++ b/src/tests/basic_deployment.py @@ -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': diff --git a/src/tests/gate-basic-xenial-newton b/src/tests/gate-basic-xenial-newton new file mode 100755 index 0000000..df75964 --- /dev/null +++ b/src/tests/gate-basic-xenial-newton @@ -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() diff --git a/src/tests/gate-basic-yakkety-newton b/src/tests/gate-basic-yakkety-newton new file mode 100644 index 0000000..71d6587 --- /dev/null +++ b/src/tests/gate-basic-yakkety-newton @@ -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()