Fix time usage in unit tests for agent power interface

The agent power interface unit tests were asking for the now() time
which is system user time relative. For example, for US-Pacific would
display 10 AM. Where as the rest of ironic was expecting 5 PM for the
test as the base code uses utcnow() instead of now().

Change-Id: Icb6bb30d1859eb3787bb5f4df4ad97143a098017
This commit is contained in:
Julia Kreger 2020-08-12 10:00:14 -07:00
parent 3fd9b55880
commit 0d94ef67cb
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class AgentPowerTest(db_base.DbTestCase):
self.config(fast_track=True, group='deploy')
self.power = agent_power.AgentPower()
dii = {
'agent_last_heartbeat': datetime.datetime.now().strftime(
'agent_last_heartbeat': datetime.datetime.utcnow().strftime(
"%Y-%m-%dT%H:%M:%S.%f"),
'deployment_reboot': True,
'agent_url': 'http://url',