Remove duplicated tests code in Nova tests
Lots of code in nova tests is duplicated.
This blueprint is a summary list of problem places that needs to be worked on
We should create separate classes for different methods tests to improve tests setUp code.
Tests should be refactored to remove duplicated code and improve test assertions.
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- Low
- Drafter:
- Alexei Kornienko
- Direction:
- Approved
- Assignee:
- Alexei Kornienko
- Definition:
- Approved
- Series goal:
- Accepted for havana
- Implementation:
- Implemented
- Milestone target:
- 2013.2
- Started by
- Russell Bryant
- Completed by
- Russell Bryant
Related branches
Related bugs
Sprints
Whiteboard
Currently this tests have following problems:
1) Different tests use different methods to setup fixtures and stubs
2) A lot of setup code is duplicated
3) Test classes a too big and should be separated in smaller ones
4) Some tests assertions are quite bad and not actually asserting anything
5) some test code can be organized a little bit to create simple DSL like methods to help understand main test goal
6) need to add several tests to improve tests coverage
alexei_987
Gerrit topic: https:/
Addressed by: https:/
Moved tests for server.delete
Addressed by: https:/
Removed code duplication in api.compute.servers tests
Addressed by: https:/
Moved tests for server.
Addressed by: https:/
Code dedup in tests for server.
Addressed by: https:/
Refactor TestAddressesXM
Gerrit topic: https:/
Addressed by: https:/
Refactor test_update_* from test_servers.py in current API tests and v3.
Addressed by: https:/
Refactor class ServersControll
Addressed by: https:/
Refactor ServerStatusTest class
Addressed by: https:/
Ref?ctor test_quota_sets.
Gerrit topic: https:/
Addressed by: https:/
Refactor test_evacuate.
Gerrit topic: https:/
Addressed by: https:/
Refactor class ImageXMLSeriali
Addressed by: https:/
Refactor ServersViewBuil
Addressed by: https:/
Refactor class ImagesControlle
Addressed by: https:/
Refactor class TestServerActio
Addressed by: https:/
Move tests in virt.libvirt.
Addressed by: https:/
Refactor test_libvirt_vif
Addressed by: https:/
Make ServerXMLSerial
Addressed by: https:/
Refactor virt.libvirt.
Addressed by: https:/
Refactor test_libvirt_volume
Addressed by: https:/
Refactor class InstanceTypeExt
Addressed by: https:/
Refactor class QuotaReserveSql
Addressed by: https:/
Make EvacuateTest DRYer
Addressed by: https:/
Move tests test_update_* to separate class
Addressed by: https:/
Code dedup in test_update_*
Addressed by: https:/
Refactor unittest for extensions os-images v3
Work Items
Work items:
[alexei-kornienko] test_delete_
[alexei-kornienko] test_get_server_* : DONE
[akamyshnikova] test_rebuild_
[akamyshnikova] class ServersControll
[akamyshnikova] class ImageXMLSeriali
[akamyshnikova] virt.libvirt.
[akamyshnikova] virt.libvirt.
[eyuzlikeev] plugins.
[eyuzlikeev] plugins.
[eyuzlikeev] virt.libvirt.
[a-gorodnev] class TestAddressesXM
[a-gorodnev] class ServersViewBuil
[a-gorodnev] class ServerXMLSerial
[a-gordeev] class ServerStatusTest: DONE
[eezhova] test_update_* : DONE
[eezhova] class ImagesControlle
[eezhova] class TestServerActio
[eezhova] virt.libvirt.
[eezhova] class InstanceTypeExt
[eezhova] class QuotaReserveSql