Tests don't correctly cleanup in case of an error
Bug #1723725 reported by
Michel Peterson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
networking-bgpvpn |
New
|
Undecided
|
Unassigned |
Bug Description
There are several contexts that are affected. An example is the `bgpvpn()` context [1], where the yield [2] is not surrounded by a correct error management and therefore if a test asserts an error and it fails to assert the bgpvpn won't get deleted, as the delete is after the yield.
[1]: https:/
[2] https:/
This should be modified to something like
"""
try:
yield bgpvpn
finally:
self.
"""
This same fix should be applied to all affected contexts.
To post a comment you must log in.
The autodeletion is not mandatory? The database is deleted after each test? /specs. openstack. org/openstack/ neutron- specs/specs/ juno/remove- unit-test- autodeletion. html
https:/