Enable functional tests for bionic-train

This patch also updates the smoke test to run bionic-train.

Change-Id: I6c063ca760a9d48f632d6cac095f4b12cd66db3c
This commit is contained in:
Corey Bryant 2019-10-22 15:12:21 -04:00
parent 2cfb795490
commit d565a0204b
3 changed files with 42 additions and 1 deletions

View File

@ -109,6 +109,11 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
{'name': 'neutron-openvswitch'},
]
other_services += other_ocata_services
if self._get_openstack_release() >= self.bionic_train:
other_train_services = [
{'name': 'placement'},
]
other_services += other_train_services
super(NovaCCBasicDeployment, self)._add_services(this_service,
other_services)
@ -143,12 +148,20 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
'rabbitmq-server:amqp': 'neutron-openvswitch:amqp',
}
relations.update(ocata_relations)
if self._get_openstack_release() >= self.bionic_train:
train_relations = {
'placement:shared-db': 'percona-cluster:shared-db',
'placement:identity-service': 'keystone:identity-service',
'placement:placement': 'nova-cloud-controller:placement',
}
relations.update(train_relations)
super(NovaCCBasicDeployment, self)._add_relations(relations)
def _configure_services(self):
"""Configure all of the services."""
nova_cc_config = {}
nova_config = {}
placement_config = {}
# Add some rate-limiting options to the charm. These will noop before
# icehouse.
@ -174,6 +187,8 @@ class NovaCCBasicDeployment(OpenStackAmuletDeployment):
'nova-compute': nova_config,
'percona-cluster': pxc_config,
}
if self._get_openstack_release() >= self.bionic_train:
configs['placement'] = placement_config
super(NovaCCBasicDeployment, self)._configure_services(configs)

26
tests/gate-basic-bionic-train Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env python
#
# Copyright 2016 Canonical Ltd
#
# 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.
"""Amulet tests on a basic nova cloud controller deployment on
bionic-train."""
from basic_deployment import NovaCCBasicDeployment
if __name__ == '__main__':
deployment = NovaCCBasicDeployment(series='bionic',
openstack='cloud:bionic-train',
source='cloud:bionic-train')
deployment.run_tests()

View File

@ -105,7 +105,7 @@ basepython = python2.7
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-stein --no-destroy
bundletester -vl DEBUG -r json -o func-results.json gate-basic-bionic-train --no-destroy
[testenv:func-dev]
# Charm Functional Test