From: Henry Gessau Date: Fri, 27 Mar 2015 02:54:21 +0000 (-0400) Subject: Modify a different agent in test_update_agent_description X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=eb79e5fe53e61af11033a5b824052d052ee755a9;p=openstack-build%2Fneutron-build.git 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 --- 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']