fix conf
Change-Id: I6b14932a9c603d0f415578b66fec4ff7707f4d43
This commit is contained in:
parent
186a0dad33
commit
eb5b5f268d
@ -22,9 +22,11 @@ TEMPEST_CONFIG=$BASE/new/tempest/etc/tempest.conf
|
|||||||
iniset $TEMPEST_CONFIG service_available vitrage true
|
iniset $TEMPEST_CONFIG service_available vitrage true
|
||||||
|
|
||||||
if [ "$1" = "mock" ]; then
|
if [ "$1" = "mock" ]; then
|
||||||
|
iniset $TEMPEST_CONFIG root_cause_analysis_service zabbix_alarms_per_host 8
|
||||||
iniset $TEMPEST_CONFIG root_cause_analysis_service instances_per_host 50
|
iniset $TEMPEST_CONFIG root_cause_analysis_service instances_per_host 50
|
||||||
iniset $TEMPEST_CONFIG root_cause_analysis_service snapshots_interval 60
|
iniset $TEMPEST_CONFIG root_cause_analysis_service snapshots_interval 60
|
||||||
else
|
else
|
||||||
|
iniset $TEMPEST_CONFIG root_cause_analysis_service zabbix_alarms_per_host 2
|
||||||
iniset $TEMPEST_CONFIG root_cause_analysis_service instances_per_host 2
|
iniset $TEMPEST_CONFIG root_cause_analysis_service instances_per_host 2
|
||||||
iniset $TEMPEST_CONFIG root_cause_analysis_service snapshots_interval 120
|
iniset $TEMPEST_CONFIG root_cause_analysis_service snapshots_interval 120
|
||||||
fi
|
fi
|
||||||
@ -53,4 +55,4 @@ sudo -E stestr init
|
|||||||
echo "Listing existing Tempest tests"
|
echo "Listing existing Tempest tests"
|
||||||
sudo -E stestr list vitrage_tempest_plugin | grep -E "$TESTS" | sort | tee /tmp/vitrage_tempest_tests.list
|
sudo -E stestr list vitrage_tempest_plugin | grep -E "$TESTS" | sort | tee /tmp/vitrage_tempest_tests.list
|
||||||
echo "Testing $1: $TESTS..."
|
echo "Testing $1: $TESTS..."
|
||||||
sudo -E stestr run --serial --subunit --load-list=/tmp/vitrage_tempest_tests.list | subunit-trace --fails
|
sudo -E stestr run --serial --subunit --load-list=/tmp/vitrage_tempest_tests.list | subunit-trace --fails --no-failure-debug
|
||||||
|
@ -35,6 +35,7 @@ RcaServiceGroup = [
|
|||||||
default=120,
|
default=120,
|
||||||
min=10,
|
min=10,
|
||||||
help='Time to wait between subsequent datasource snapshots'),
|
help='Time to wait between subsequent datasource snapshots'),
|
||||||
|
cfg.IntOpt('zabbix_alarms_per_host', default=2),
|
||||||
cfg.StrOpt('aodh_version', default='2', help='Aodh version'),
|
cfg.StrOpt('aodh_version', default='2', help='Aodh version'),
|
||||||
cfg.StrOpt('ceilometer_version', default='2', help='Ceilometer version'),
|
cfg.StrOpt('ceilometer_version', default='2', help='Ceilometer version'),
|
||||||
cfg.StrOpt('nova_version', default='2.11', help='Nova version'),
|
cfg.StrOpt('nova_version', default='2.11', help='Nova version'),
|
||||||
|
@ -38,9 +38,17 @@ MAX_FAIL_OVER_TIME = 20
|
|||||||
|
|
||||||
class TestLongProcessing(TestActionsBase):
|
class TestLongProcessing(TestActionsBase):
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
super(TestLongProcessing, self).tearDown()
|
||||||
|
if v_utils.get_first_template(name=TEMPLATE_NAME):
|
||||||
|
v_utils.delete_template(name=TEMPLATE_NAME)
|
||||||
|
time.sleep(SLEEP)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super(TestLongProcessing, cls).setUpClass()
|
super(TestLongProcessing, cls).setUpClass()
|
||||||
|
logger = logging.getLogger('vitrageclient.v1.client').logger
|
||||||
|
logger.setLevel(logging.INFO)
|
||||||
if v_utils.get_first_template(name=TEMPLATE_NAME):
|
if v_utils.get_first_template(name=TEMPLATE_NAME):
|
||||||
v_utils.delete_template(name=TEMPLATE_NAME)
|
v_utils.delete_template(name=TEMPLATE_NAME)
|
||||||
time.sleep(SLEEP)
|
time.sleep(SLEEP)
|
||||||
@ -88,13 +96,9 @@ class TestLongProcessing(TestActionsBase):
|
|||||||
'CRITICAL doctor events expected')
|
'CRITICAL doctor events expected')
|
||||||
finally:
|
finally:
|
||||||
self._remove_doctor_events()
|
self._remove_doctor_events()
|
||||||
if v_utils.get_first_template(name=TEMPLATE_NAME):
|
|
||||||
v_utils.delete_template(name=TEMPLATE_NAME)
|
|
||||||
time.sleep(SLEEP)
|
|
||||||
|
|
||||||
@utils.tempest_logger
|
@utils.tempest_logger
|
||||||
def test_db_init(self):
|
def test_db_init(self):
|
||||||
try:
|
|
||||||
v_utils.add_template(TEMPLATE_NAME)
|
v_utils.add_template(TEMPLATE_NAME)
|
||||||
time.sleep(SLEEP)
|
time.sleep(SLEEP)
|
||||||
|
|
||||||
@ -116,14 +120,8 @@ class TestLongProcessing(TestActionsBase):
|
|||||||
time.sleep(SLEEP)
|
time.sleep(SLEEP)
|
||||||
self._check_template_instance_3rd_degree_scenarios_deleted()
|
self._check_template_instance_3rd_degree_scenarios_deleted()
|
||||||
|
|
||||||
finally:
|
|
||||||
if v_utils.get_first_template(name=TEMPLATE_NAME):
|
|
||||||
v_utils.delete_template(name=TEMPLATE_NAME)
|
|
||||||
time.sleep(SLEEP)
|
|
||||||
|
|
||||||
def _check_template_instance_3rd_degree_scenarios(self):
|
def _check_template_instance_3rd_degree_scenarios(self):
|
||||||
|
|
||||||
try:
|
|
||||||
alarm_count = TempestClients.vitrage().alarm.count(
|
alarm_count = TempestClients.vitrage().alarm.count(
|
||||||
all_tenants=True)
|
all_tenants=True)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
@ -135,8 +133,8 @@ class TestLongProcessing(TestActionsBase):
|
|||||||
alarm_count['CRITICAL'],
|
alarm_count['CRITICAL'],
|
||||||
'Each instance should have one CRITICAL deduced alarm')
|
'Each instance should have one CRITICAL deduced alarm')
|
||||||
|
|
||||||
expected_rca = [{VertexProperties.VITRAGE_TYPE: 'zabbix'}] * self.\
|
expected_rca = [{VertexProperties.VITRAGE_TYPE: 'zabbix'}] * CONF.\
|
||||||
conf.mock_graph_datasource.zabbix_alarms_per_host
|
root_cause_analysis_service.zabbix_alarms_per_host
|
||||||
expected_rca.extend([{'name': DEDUCED_1}, {'name': DEDUCED_2}])
|
expected_rca.extend([{'name': DEDUCED_1}, {'name': DEDUCED_2}])
|
||||||
|
|
||||||
def check_rca(alarm):
|
def check_rca(alarm):
|
||||||
@ -159,9 +157,6 @@ class TestLongProcessing(TestActionsBase):
|
|||||||
deduced_alarms)]
|
deduced_alarms)]
|
||||||
self.assertTrue(all(workers_result))
|
self.assertTrue(all(workers_result))
|
||||||
|
|
||||||
finally:
|
|
||||||
v_utils.delete_template(name=TEMPLATE_NAME)
|
|
||||||
|
|
||||||
def _check_template_instance_3rd_degree_scenarios_deleted(self):
|
def _check_template_instance_3rd_degree_scenarios_deleted(self):
|
||||||
alarm_count = TempestClients.vitrage().alarm.count(
|
alarm_count = TempestClients.vitrage().alarm.count(
|
||||||
all_tenants=True)
|
all_tenants=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user