Enable bionic/stein and disco/stein functional tests
Change-Id: I04958075c2bd22ff0d932ca05cdc8d1868f0995c
This commit is contained in:
parent
fe218f5862
commit
11c62d0aa0
@ -52,7 +52,7 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
|
||||
services = ("neutron-server", "apache2", "haproxy")
|
||||
u.get_unit_process_ids(
|
||||
{self.neutron_api_sentry: services},
|
||||
expect_success=should_run)
|
||||
expect_success=should_run, pgrep_full=self.pgrep_full)
|
||||
|
||||
def _add_services(self):
|
||||
"""Add services
|
||||
@ -155,6 +155,13 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
|
||||
self.neutron_ovs_sentry = self.d.sentry['neutron-openvswitch'][0]
|
||||
self.nova_compute_sentry = self.d.sentry['nova-compute'][0]
|
||||
|
||||
# pidof is failing to find neutron-server on stein
|
||||
# use pgrep instead.
|
||||
if self._get_openstack_release() >= self.bionic_stein:
|
||||
self.pgrep_full = True
|
||||
else:
|
||||
self.pgrep_full = False
|
||||
|
||||
u.log.debug('openstack release val: {}'.format(
|
||||
self._get_openstack_release()))
|
||||
u.log.debug('openstack release str: {}'.format(
|
||||
@ -579,11 +586,13 @@ class NeutronAPIBasicDeployment(OpenStackAmuletDeployment):
|
||||
|
||||
for s, conf_file in services.iteritems():
|
||||
u.log.debug("Checking that service restarted: {}".format(s))
|
||||
if not u.validate_service_config_changed(sentry, mtime, s,
|
||||
conf_file,
|
||||
retry_count=4,
|
||||
retry_sleep_time=20,
|
||||
sleep_time=20):
|
||||
if not u.validate_service_config_changed(
|
||||
sentry, mtime, s,
|
||||
conf_file,
|
||||
retry_count=4,
|
||||
retry_sleep_time=20,
|
||||
sleep_time=20,
|
||||
pgrep_full=self.pgrep_full):
|
||||
self.d.configure(juju_service, set_default)
|
||||
msg = "service {} didn't restart after config change".format(s)
|
||||
amulet.raise_status(amulet.FAIL, msg=msg)
|
||||
|
23
tests/dev-basic-disco-stein
Executable file
23
tests/dev-basic-disco-stein
Executable file
@ -0,0 +1,23 @@
|
||||
#!/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 neutron-api deployment on disco-stein."""
|
||||
|
||||
from basic_deployment import NeutronAPIBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = NeutronAPIBasicDeployment(series='disco')
|
||||
deployment.run_tests()
|
25
tests/gate-basic-bionic-stein
Executable file
25
tests/gate-basic-bionic-stein
Executable file
@ -0,0 +1,25 @@
|
||||
#!/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 neutron-api deployment on bionic-stein."""
|
||||
|
||||
from basic_deployment import NeutronAPIBasicDeployment
|
||||
|
||||
if __name__ == '__main__':
|
||||
deployment = NeutronAPIBasicDeployment(series='bionic',
|
||||
openstack='cloud:bionic-stein',
|
||||
source='cloud:bionic-stein')
|
||||
deployment.run_tests()
|
Loading…
x
Reference in New Issue
Block a user