Use utctime when adding measures

gnocchi/aodh evaluator use utctime and not localtime.

Change-Id: I581bb9a7d496a50ebdc0d7c3e1bbcd17694b306c
Story: #2004392
Task: 28019
This commit is contained in:
Rabi Mishra 2018-11-21 06:44:03 +05:30
parent d6b253502a
commit f1c2092787

View File

@ -51,9 +51,9 @@ class AodhAlarmTest(scenario_base.ScenarioTestsBase):
stack_identifier = self.stack_create(template=self.template,
parameters=parameters)
measures = [{'timestamp': test.isotime(datetime.datetime.now()),
measures = [{'timestamp': test.isotime(datetime.datetime.utcnow()),
'value': 100}, {'timestamp': test.isotime(
datetime.datetime.now() + datetime.timedelta(
datetime.datetime.utcnow() + datetime.timedelta(
minutes=1)), 'value': 100}]
# send measures(should cause the alarm to fire)
self.metric_client.metric.add_measures(metric['id'], measures)