Add test with Heat notifications
Change-Id: I6d238b75ab9bdb563d1db57906998f7f8b6ce308
This commit is contained in:
@@ -245,3 +245,37 @@ class ToolchainApi(object):
|
|||||||
[hit["_source"]["event_type"] for hit in output["hits"]["hits"]]))
|
[hit["_source"]["event_type"] for hit in output["hits"]["hits"]]))
|
||||||
self.helpers.check_notifications(notification_list,
|
self.helpers.check_notifications(notification_list,
|
||||||
keystone_event_types)
|
keystone_event_types)
|
||||||
|
|
||||||
|
def check_heat_notifications(self):
|
||||||
|
heat_event_types = [
|
||||||
|
"orchestration.stack.check.start",
|
||||||
|
"orchestration.stack.check.end",
|
||||||
|
"orchestration.stack.create.start",
|
||||||
|
"orchestration.stack.create.end",
|
||||||
|
"orchestration.stack.delete.start",
|
||||||
|
"orchestration.stack.delete.end",
|
||||||
|
"orchestration.stack.resume.start",
|
||||||
|
"orchestration.stack.resume.end",
|
||||||
|
"orchestration.stack.rollback.start",
|
||||||
|
"orchestration.stack.rollback.end",
|
||||||
|
"orchestration.stack.suspend.start",
|
||||||
|
"orchestration.stack.suspend.end"
|
||||||
|
]
|
||||||
|
test_class_main = ('fuel_health.tests.tests_platform.test_heat.'
|
||||||
|
'HeatSmokeTests')
|
||||||
|
|
||||||
|
test_names = ['test_actions', 'test_advanced_actions', 'test_rollback']
|
||||||
|
|
||||||
|
test_classes = []
|
||||||
|
|
||||||
|
for test_name in test_names:
|
||||||
|
test_classes.append('{0}.{1}'.format(test_class_main, test_name))
|
||||||
|
|
||||||
|
for test_name in test_classes:
|
||||||
|
self.helpers.run_single_ostf(
|
||||||
|
test_sets=['smoke'], test_name=test_name)
|
||||||
|
output = self.ELASTICSEARCH_KIBANA.query_elasticsearch(
|
||||||
|
index_type="notification", query_filter="Logger:heat", size=500)
|
||||||
|
notification_list = list(set(
|
||||||
|
[hit["_source"]["event_type"] for hit in output["hits"]["hits"]]))
|
||||||
|
self.helpers.check_notifications(notification_list, heat_event_types)
|
||||||
|
|||||||
@@ -170,3 +170,24 @@ class TestFunctionalToolchain(api.ToolchainApi):
|
|||||||
self.check_plugins_online()
|
self.check_plugins_online()
|
||||||
|
|
||||||
self.check_keystone_notifications()
|
self.check_keystone_notifications()
|
||||||
|
|
||||||
|
@test(depends_on_groups=["deploy_toolchain"],
|
||||||
|
groups=["check_heat_notifications_toolchain", "toolchain",
|
||||||
|
"functional", "query_elasticsearch"])
|
||||||
|
@log_snapshot_after_test
|
||||||
|
def check_heat_notifications_toolchain(self):
|
||||||
|
"""Check that Heat notifications are present in Elasticsearch
|
||||||
|
|
||||||
|
Scenario:
|
||||||
|
1. Revert snapshot with 3 deployed nodes
|
||||||
|
2. Run OSTF Heat platform tests
|
||||||
|
3. Check that Heat notifications are present in current
|
||||||
|
Elasticsearch index
|
||||||
|
|
||||||
|
Duration 25m
|
||||||
|
"""
|
||||||
|
self.env.revert_snapshot("deploy_toolchain")
|
||||||
|
|
||||||
|
self.check_plugins_online()
|
||||||
|
|
||||||
|
self.check_heat_notifications()
|
||||||
|
|||||||
Reference in New Issue
Block a user