yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65152
[Bug 1699199] [NEW] test_agent_management resource_setup assumes multiple agents
Public bug reported:
https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/api/admin/test_agent_management.py#L26-L31
resource_setup assumes that admin_client.list_agents will return at least 2 different agents, agents[0] and agents[1]. If there is only 1 agent, this setup will fail when trying to access agents[1]. A trace can be found below.
ft1.1: setUpClass (neutron.tests.tempest.api.admin.test_agent_management.AgentManagementTestJSON)_StringException: Traceback (most recent call last):
File "tempest/test.py", line 244, in setUpClass
six.reraise(etype, value, trace)
File "tempest/test.py", line 237, in setUpClass
cls.resource_setup()
File "/opt/stack/neutron/neutron/tests/tempest/api/admin/test_agent_management.py", line 31, in resource_setup
cls.dyn_agent = agents[1]
IndexError: list index out of range
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1699199
Title:
test_agent_management resource_setup assumes multiple agents
Status in neutron:
New
Bug description:
https://github.com/openstack/neutron/blob/master/neutron/tests/tempest/api/admin/test_agent_management.py#L26-L31
resource_setup assumes that admin_client.list_agents will return at least 2 different agents, agents[0] and agents[1]. If there is only 1 agent, this setup will fail when trying to access agents[1]. A trace can be found below.
ft1.1: setUpClass (neutron.tests.tempest.api.admin.test_agent_management.AgentManagementTestJSON)_StringException: Traceback (most recent call last):
File "tempest/test.py", line 244, in setUpClass
six.reraise(etype, value, trace)
File "tempest/test.py", line 237, in setUpClass
cls.resource_setup()
File "/opt/stack/neutron/neutron/tests/tempest/api/admin/test_agent_management.py", line 31, in resource_setup
cls.dyn_agent = agents[1]
IndexError: list index out of range
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1699199/+subscriptions
Follow ups