The test of test_l3_plugin.L3NatExtensionTestCase is similar with test_api_v2.py:JSONV2TestCase
Bug #1077876 reported by
Alex Xu
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_
I suggest move all test of TestL3NatPlugin to L3NatDBTestCase, test with db. And remove TestL3NatPlugin
As Salvatore suggestion, File a bug for this. https:/
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.