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:
parent
3fd9b55880
commit
0d94ef67cb
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user