The test of test_l3_plugin.L3NatExtensionTestCase is similar with test_api_v2.py:JSONV2TestCase

Bug #1077876 reported by Alex Xu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Undecided
Unassigned

Bug Description

The test of TestL3NatPlugin don't looks like testing l3 plugin. It tests how controller pass the params to plugin and how contoller return the result. So it similar with test_api_v2.py:JSONV2TestCase doing.

I suggest move all test of TestL3NatPlugin to L3NatDBTestCase, test with db. And remove TestL3NatPlugin

As Salvatore suggestion, File a bug for this. https://review.openstack.org/#/c/15614/

Alex Xu (xuhj)
description: updated
Revision history for this message
dan wendlandt (danwent) wrote :

I'm not sure this is a bug, as this was intentional.

A common practice with unit tests is to try to have tests that isolate smaller chunks of the code to validate, even if most of those scenarios are then re-tested later as sub-components of a more involved test. In this case, we have some basic tests of the API layer, so that we can tell if the API layer is working, but the DB layer is failing. This is the same pattern we did with the core plugin in JSONV2TestCase, so I'm not sure why we would not also do it for the L3 stuff.

I don't feel super strongly about this, but I suspect our dev and reviewing cycles could be used one something more urgent.

If there are scenarios tested in TestL3NatPlugin that are NOT tested in L3NatDBTestCase, adding those to the latter class to make sure we're testing the DB side as well as the API side would be good.

Changed in quantum:
status: New → Incomplete
Revision history for this message
Alex Xu (xuhj) wrote :

Let me add those scenarios, that tested in TestL3NatPlugin that are NOT tested in L3NatDBTestCase, for L3NatDBTestCase first.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for quantum because there has been no activity for 60 days.]

Changed in quantum:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.