Reenable the tempest test about nova notification
1. The test was skipped because bug 1480490, which has been fixed a year ago.
The test is valuable for testing Nova notifications handling, so reenable
it now.
2. The events won't be collected(no event dispacther configured in
devstack installation), so remove the events check of the nova
notification test.
Change-Id: Ic86b5d9ce5bb8e07679aec11f84cf32205a08322
diff --git a/ceilometer/tests/tempest/api/base.py b/ceilometer/tests/tempest/api/base.py
index 10eea60..d19e025 100644
--- a/ceilometer/tests/tempest/api/base.py
+++ b/ceilometer/tests/tempest/api/base.py
@@ -143,16 +143,3 @@
def setup_clients(cls):
super(BaseTelemetryAdminTest, cls).setup_clients()
cls.telemetry_admin_client = cls.os_adm.telemetry_client
-
- def await_events(self, query):
- timeout = CONF.compute.build_timeout
- start = timeutils.utcnow()
- while timeutils.delta_seconds(start, timeutils.utcnow()) < timeout:
- body = self.telemetry_admin_client.list_events(query)
- if body:
- return body
- time.sleep(CONF.compute.build_interval)
-
- raise exceptions.TimeoutException(
- 'Event with query:%s has not been added to the '
- 'database within %d seconds' % (query, CONF.compute.build_timeout))
diff --git a/ceilometer/tests/tempest/api/test_telemetry_notification_api.py b/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
index 91271b0..b0809ee 100644
--- a/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
+++ b/ceilometer/tests/tempest/api/test_telemetry_notification_api.py
@@ -16,7 +16,6 @@
from ceilometer.tests.tempest.api import base
from tempest import config
-from tempest.lib import decorators
from tempest import test
@@ -57,15 +56,10 @@
@test.idempotent_id('29604198-8b45-4fc0-8af8-1cae4f94ebea')
@test.services('compute')
- @decorators.skip_because(bug='1480490')
def test_check_nova_notification_event_and_meter(self):
body = self.create_server()
- if CONF.telemetry.event_enabled:
- query = ('instance_id', 'eq', body['id'])
- self.await_events(query)
-
query = ('resource', 'eq', body['id'])
for metric in self.nova_notifications:
self.await_samples(metric, query)
diff --git a/ceilometer/tests/tempest/service/client.py b/ceilometer/tests/tempest/service/client.py
index b45cb70..6fe637f 100644
--- a/ceilometer/tests/tempest/service/client.py
+++ b/ceilometer/tests/tempest/service/client.py
@@ -83,10 +83,6 @@
uri = '%s/meters/%s' % (self.uri_prefix, meter_id)
return self._helper_list(uri, query)
- def list_events(self, query=None):
- uri = '%s/events' % self.uri_prefix
- return self._helper_list(uri, query)
-
def show_resource(self, resource_id):
uri = '%s/resources/%s' % (self.uri_prefix, resource_id)
resp, body = self.get(uri)