Fix copy-paste mistakes and typos and remove dead code
This commit is contained in:
@@ -111,7 +111,7 @@ class AodhTest(test_utils.OpenStackBaseTest):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
|
||||
@@ -34,7 +34,6 @@ class CeilometerTest(test_utils.OpenStackBaseTest):
|
||||
XENIAL_NEWTON = openstack_utils.get_os_release('xenial_newton')
|
||||
XENIAL_MITAKA = openstack_utils.get_os_release('xenial_mitaka')
|
||||
TRUSTY_MITAKA = openstack_utils.get_os_release('trusty_mitaka')
|
||||
TRUSTY_LIBERTY = openstack_utils.get_os_release('trusty_liberty')
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -44,7 +43,7 @@ class CeilometerTest(test_utils.OpenStackBaseTest):
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
"""Return a list of services for Openstack Release."""
|
||||
"""Return a list of services for the selected Openstack release."""
|
||||
services = []
|
||||
|
||||
if self.application_name == 'ceilometer-agent':
|
||||
@@ -81,21 +80,14 @@ class CeilometerTest(test_utils.OpenStackBaseTest):
|
||||
services.append('ceilometer-alarm-notifier')
|
||||
services.append('ceilometer-alarm-evaluator')
|
||||
|
||||
# if self.current_release >= CeilometerTest.TRUSTY_LIBERTY:
|
||||
# Liberty and later
|
||||
# services.append('ceilometer-polling')
|
||||
# else:
|
||||
# Juno and earlier
|
||||
# services.append('ceilometer-agent-central')
|
||||
|
||||
return services
|
||||
|
||||
@property
|
||||
def restartable_services(self):
|
||||
"""Return a list of services that are known to be restartable.
|
||||
|
||||
For Openstack Release these services are known to be able to be stopped
|
||||
and started with no issues.
|
||||
For the selected Openstack release these services are known to be able
|
||||
to be stopped and started with no issues.
|
||||
"""
|
||||
# Due to Bug #1861321 ceilometer-collector does not reliably
|
||||
# restart.
|
||||
|
||||
@@ -153,7 +153,7 @@ class CinderTests(test_utils.OpenStackBaseTest):
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
"""Return a list services for OpenStack release."""
|
||||
"""Return a list services for the selected Openstack release."""
|
||||
services = ['cinder-scheduler', 'cinder-volume']
|
||||
if (openstack_utils.get_os_release() >=
|
||||
openstack_utils.get_os_release('xenial_ocata')):
|
||||
@@ -165,7 +165,7 @@ class CinderTests(test_utils.OpenStackBaseTest):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
@@ -176,7 +176,7 @@ class CinderTests(test_utils.OpenStackBaseTest):
|
||||
conf_file = '/etc/cinder/cinder.conf'
|
||||
|
||||
# Make config change, check for service restarts
|
||||
logging.debug('Setting disk format glance...')
|
||||
logging.debug('Setting debug mode...')
|
||||
self.restart_on_changed(
|
||||
conf_file,
|
||||
set_default,
|
||||
|
||||
@@ -40,7 +40,7 @@ class CinderBackupTest(test_utils.OpenStackBaseTest):
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
"""Return a list services for Openstack Release."""
|
||||
"""Return a list services for the selected Openstack release."""
|
||||
current_release = openstack_utils.get_os_release()
|
||||
services = ['cinder-scheduler', 'cinder-volume']
|
||||
if (current_release >=
|
||||
|
||||
@@ -95,7 +95,7 @@ class DesignateTests(BaseDesignateTest):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
|
||||
@@ -44,7 +44,7 @@ class GlanceTest(test_utils.OpenStackBaseTest):
|
||||
def test_411_set_disk_format(self):
|
||||
"""Change disk format and check.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change disk format and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
|
||||
@@ -28,7 +28,7 @@ class GnocchiTest(test_utils.OpenStackBaseTest):
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
"""Return a list of services for Openstack Release."""
|
||||
"""Return a list of services for the selected Openstack release."""
|
||||
return ['haproxy', 'gnocchi-metricd', 'apache2']
|
||||
|
||||
def test_200_api_connection(self):
|
||||
|
||||
@@ -54,7 +54,7 @@ class HeatBasicDeployment(test_utils.OpenStackBaseTest):
|
||||
|
||||
@property
|
||||
def services(self):
|
||||
"""Return a list services for OpenStack release.
|
||||
"""Return a list services for the selected Openstack release.
|
||||
|
||||
:returns: List of services
|
||||
:rtype: [str]
|
||||
|
||||
@@ -78,7 +78,7 @@ class MySQLCommonTests(MySQLBaseTest):
|
||||
def test_910_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change max connections and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
@@ -86,7 +86,7 @@ class MySQLCommonTests(MySQLBaseTest):
|
||||
set_alternate = {"max-connections": "1000"}
|
||||
|
||||
# Make config change, check for service restarts
|
||||
logging.debug("Setting peer timeout ...")
|
||||
logging.debug("Setting max connections ...")
|
||||
self.restart_on_changed(
|
||||
self.conf_file,
|
||||
set_default,
|
||||
|
||||
@@ -113,7 +113,7 @@ class NeutronGatewayTest(NeutronPluginApiSharedTests):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
@@ -285,7 +285,7 @@ class NeutronApiTest(NeutronCreateNetworkTest):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
|
||||
@@ -75,7 +75,7 @@ class NovaCompute(test_utils.OpenStackBaseTest):
|
||||
def test_900_restart_on_config_change(self):
|
||||
"""Checking restart happens on config change.
|
||||
|
||||
Change disk format and assert then change propagates to the correct
|
||||
Change debug mode and assert that change propagates to the correct
|
||||
file and that services are restarted as a result
|
||||
"""
|
||||
# Expected default and alternate values
|
||||
|
||||
@@ -259,7 +259,7 @@ class BaseCharmTest(unittest.TestCase):
|
||||
pgrep_full=False):
|
||||
"""Run restart on change tests.
|
||||
|
||||
Test that changing config results in config file being updates and
|
||||
Test that changing config results in config file being updated and
|
||||
services restarted. Return config to default_config afterwards
|
||||
|
||||
:param config_file: Config file to check for settings
|
||||
|
||||
Reference in New Issue
Block a user