Hyper-V unit tests refactoring (partial)

Registered by Alessandro Pilotti

The Hyper-V driver oldest tests (test_hypervapi.py) are proving hard to maintain, we need to fix that.

The tests in test_hypervapi.py in particular can also be refactored and split in separate TestCases, one of each *ops module.

This effort will:

* improve the readability of the tests
* remove remaining fakes and stubs
* make better use of patching
* reduce conflicts during rebases

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Low
Drafter:
Alessandro Pilotti
Direction:
Approved
Assignee:
Claudiu Belu
Definition:
Approved
Series goal:
Accepted for kilo
Implementation:
Implemented
Milestone target:
milestone icon 2015.1.0
Started by
Alessandro Pilotti
Completed by
John Garbutt

Related branches

Sprints

Whiteboard

Approved, because it doesn't need a spec for kilo. --johnthetubaguy 10th October 2014

Gerrit topic: https://review.openstack.org/#q,topic:bp/hyper-v-test-refactoring,n,z

Addressed by: https://review.openstack.org/136341
    Hyper-V: Adds HostOps unit tests

Addressed by: https://review.openstack.org/136342
    Hyper-V: Removes redundant utilsfactory tests from test_hypervapi

Addressed by: https://review.openstack.org/136343
    Hyper-V: Adds LiveMigrationOps unit tests

Addressed by: https://review.openstack.org/136344
    Hyper-V: Adds Hyper-V SnapshotOps tests

Addressed by: https://review.openstack.org/136345
    Hyper-V: Refactors Hyper-V VMOps unit tests

Addressed by: https://review.openstack.org/136346
    Hyper-V: Adds VMOps unit tests (part 1)

Addressed by: https://review.openstack.org/138934
    Hyper-V: Adds VMOps unit tests (part 2)

Addressed by: https://review.openstack.org/139796
    Hyper-V: Adds MigrationOps unit tests

Addressed by: https://review.openstack.org/139797
    Hyper-V: Adds VolumeOps unit tests

Addressed by: https://review.openstack.org/139798
    Hyper-V: removes test_hypervapi tests

Not enough positive reviews on this code for it to make kilo-1, moving to kilo-2 --johnthetubaguy 17th December 2014

Addressed by: https://review.openstack.org/148980
    WIP Hyper-V: Adds HyperVDriver unit tests

Addressed by: https://review.openstack.org/133509
    hyperv: use instance object in driver.py

Addressed by: https://review.openstack.org/149990
    hyperv: use instance object in imagecache.py

Addressed by: https://review.openstack.org/149991
    hyperv: use instance object in migrationops.py

Addressed by: https://review.openstack.org/149992
    hyperv: use instance object in rdbconsoleops.py

Addressed by: https://review.openstack.org/149993
    hyperv: use instance object in vif.py

Addressed by: https://review.openstack.org/149995
    hyperv: use instance object in vmops.py

This doesn't really need a blueprint, so its re-approved for kilo --johnthetubaguy 16th Feb 2015

https://review.openstack.org/#/c/138934 is approved, so now marking this partially complete. I have removed the blueprint tag from follow on patches, as they are still good to merge, but we need to stop tracking this here as RC critical items will now take priority. If you need to raise the priority of it, please raise a bug. --johnthetubaguy 19th March 2014

Addressed by: https://review.openstack.org/181916
    Hyper-V: Fixes cold migration / resize issue

Gerrit topic: https://review.openstack.org/#q,topic:bp/hyper-v-test-refactoring-liberty,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.