From eb79e5fe53e61af11033a5b824052d052ee755a9 Mon Sep 17 00:00:00 2001 From: Henry Gessau Date: Thu, 26 Mar 2015 22:54:21 -0400 Subject: [PATCH] Modify a different agent in test_update_agent_description API test_update_agent_description modifies an agent's description, and test_list_agent assumes the first agent is never modified. We make sure that an agent other than the first one is modified. Closes-bug: 1437124 Change-Id: I7593e2896ab7ef8a14ad35005314382e65e805cb --- neutron/tests/api/admin/test_agent_management.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neutron/tests/api/admin/test_agent_management.py b/neutron/tests/api/admin/test_agent_management.py index a883c7be9..013f3e44b 100644 --- a/neutron/tests/api/admin/test_agent_management.py +++ b/neutron/tests/api/admin/test_agent_management.py @@ -27,7 +27,8 @@ class AgentManagementTestJSON(base.BaseAdminNetworkTest): raise cls.skipException(msg) body = cls.admin_client.list_agents() agents = body['agents'] - cls.agent = agents[0] + cls.agent = agents[0] # don't modify this agent + cls.dyn_agent = agents[1] @test.attr(type='smoke') @test.idempotent_id('9c80f04d-11f3-44a4-8738-ed2f879b0ff4') @@ -73,7 +74,7 @@ class AgentManagementTestJSON(base.BaseAdminNetworkTest): self.useFixture(fixtures.LockFixture('agent_description')) description = 'description for update agent.' agent_description = {'description': description} - body = self.admin_client.update_agent(agent_id=self.agent['id'], + body = self.admin_client.update_agent(agent_id=self.dyn_agent['id'], agent_info=agent_description) self.addCleanup(self._restore_agent) updated_description = body['agent']['description'] -- 2.45.2