← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1501150] [NEW] Reorganize and improve L3 agent functional tests

 

Public bug reported:

This bug is to track the following work:
1) neutron/tests/functional/agent/test_l3_agent is enormous. When I created that file it was 300 lines of code. It's now nearly 1,500 lines of code. It's very difficult to find what you're looking for. I propose splitting it up so that the common helper functions and base class is in neutron/tests/functional/agent/l3/framework. The tests themselves are then to be split up to the following four modules: legacy, HA, metadata_proxy and DVR. It would also be an opportunity to make further cosmetic clean ups, finding common code and extracting it out to the framework class.

2) The tests focus on the creation of a router with complete data: A
router with internal interfaces, an external interface, floating IPs,
extra routes and so on. The existing 'lifecycle' style test is useful:
Create a router, make assertions, delete it, make some more assertions.
However, I'd like to see improved coverage for update operations, for
all three router types (Legacy, HA, DVR): Create a router without
interfaces or floating IPs, add an internal interface, make assertions.
Add an external gateway, make assertions, and so on. The existing
coverage essentially covers the case of an existing router, and
restarting an agent so that a complete router is built. The latter (And
missing) coverage is for the case of a new router being created, and API
calls coming in to gradually attach the router to existing networks and
floating IPs. Both are important cases to cover and execute at times
different code paths.

3) Are there L3 agent  or router unit tests that are superseded entirely
and could be deleted?

** Affects: neutron
     Importance: Wishlist
         Status: New


** Tags: functional-tests l3-dvr-backlog l3-ha l3-ipam-dhcp

** Tags added: l3-dvr-backlog l3-ha

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1501150

Title:
  Reorganize and improve L3 agent functional tests

Status in neutron:
  New

Bug description:
  This bug is to track the following work:
  1) neutron/tests/functional/agent/test_l3_agent is enormous. When I created that file it was 300 lines of code. It's now nearly 1,500 lines of code. It's very difficult to find what you're looking for. I propose splitting it up so that the common helper functions and base class is in neutron/tests/functional/agent/l3/framework. The tests themselves are then to be split up to the following four modules: legacy, HA, metadata_proxy and DVR. It would also be an opportunity to make further cosmetic clean ups, finding common code and extracting it out to the framework class.

  2) The tests focus on the creation of a router with complete data: A
  router with internal interfaces, an external interface, floating IPs,
  extra routes and so on. The existing 'lifecycle' style test is useful:
  Create a router, make assertions, delete it, make some more
  assertions. However, I'd like to see improved coverage for update
  operations, for all three router types (Legacy, HA, DVR): Create a
  router without interfaces or floating IPs, add an internal interface,
  make assertions. Add an external gateway, make assertions, and so on.
  The existing coverage essentially covers the case of an existing
  router, and restarting an agent so that a complete router is built.
  The latter (And missing) coverage is for the case of a new router
  being created, and API calls coming in to gradually attach the router
  to existing networks and floating IPs. Both are important cases to
  cover and execute at times different code paths.

  3) Are there L3 agent  or router unit tests that are superseded
  entirely and could be deleted?

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1501150/+subscriptions


Follow ups