Add test with Glance notifications
Change-Id: Ibca772bc03440fe7eea424f2c0f38ad89e09af61
This commit is contained in:
@@ -212,3 +212,17 @@ class ToolchainApi(object):
|
||||
for hit in output_for_logger["hits"]["hits"]]))
|
||||
self.helpers.check_notifications(logger_notifications,
|
||||
nova_event_types)
|
||||
|
||||
def check_glance_notifications(self):
|
||||
glance_event_types = ["image.create", "image.prepare", "image.upload",
|
||||
"image.activate", "image.update", "image.delete"]
|
||||
self.helpers.run_single_ostf(
|
||||
test_sets=['smoke'],
|
||||
test_name='fuel_health.tests.smoke.test_create_images.'
|
||||
'GlanceSmokeTests.test_create_and_delete_image_v2')
|
||||
output = self.ELASTICSEARCH_KIBANA.query_elasticsearch(
|
||||
index_type="notification", query_filter="Logger:glance", size=500)
|
||||
notification_list = list(set([hit["_source"]["event_type"]
|
||||
for hit in output["hits"]["hits"]]))
|
||||
self.helpers.check_notifications(notification_list,
|
||||
glance_event_types)
|
||||
|
@@ -86,7 +86,7 @@ class TestFunctionalToolchain(api.ToolchainApi):
|
||||
|
||||
@test(depends_on_groups=["deploy_ha_toolchain"],
|
||||
groups=["check_nova_logs_in_elasticsearch", "toolchain",
|
||||
"functional"])
|
||||
"functional", "query_elasticsearch"])
|
||||
@log_snapshot_after_test
|
||||
def check_nova_logs_in_elasticsearch(self):
|
||||
"""Check that Nova logs are present in Elasticsearch
|
||||
@@ -107,7 +107,7 @@ class TestFunctionalToolchain(api.ToolchainApi):
|
||||
|
||||
@test(depends_on_groups=["deploy_ha_toolchain"],
|
||||
groups=["check_nova_notifications_toolchain", "toolchain",
|
||||
"functional"])
|
||||
"functional", "query_elasticsearch"])
|
||||
@log_snapshot_after_test
|
||||
def check_nova_notifications_toolchain(self):
|
||||
"""Check that Nova notifications are present in Elasticsearch
|
||||
@@ -126,3 +126,25 @@ class TestFunctionalToolchain(api.ToolchainApi):
|
||||
self.check_plugins_online()
|
||||
|
||||
self.check_nova_notifications()
|
||||
|
||||
@test(depends_on_groups=["deploy_toolchain"],
|
||||
groups=["check_glance_notifications_toolchain", "toolchain",
|
||||
"functional", "query_elasticsearch"])
|
||||
@log_snapshot_after_test
|
||||
def check_glance_notifications_toolchain(self):
|
||||
"""Check that Glance notifications are present in Elasticsearch
|
||||
|
||||
Scenario:
|
||||
1. Revert snapshot with 3 deployed nodes
|
||||
2. Run the OSTF platform test "Check create, update and delete
|
||||
image actions using Glance v2"
|
||||
3. Check that Glance notifications are present in current
|
||||
Elasticsearch index
|
||||
|
||||
Duration 25m
|
||||
"""
|
||||
self.env.revert_snapshot("deploy_toolchain")
|
||||
|
||||
self.check_plugins_online()
|
||||
|
||||
self.check_glance_notifications()
|
||||
|
Reference in New Issue
Block a user