Improve volume unittest framework of the OSC

Registered by xiexs

The current unittest framework about volume mainly has two drawbacks, hardcode for the faking volume and only one faking volume can be faked. So, this BP attempts to improve this test framework with two steps:
1. add FakeVolume, and then with it user can generate more than faking volume and all volume info is generated by random.
2. add multi-volume testcases (e.g. TestVolumeDelete) and refactor the legacy unit tests about volume with new framework.

Blueprint information

Status:
Complete
Approver:
Steve Martinelli
Priority:
Medium
Drafter:
xiexs
Direction:
Approved
Assignee:
aohuanxuan
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Steve Martinelli
Completed by
Steve Martinelli

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/improve-volume-unittest-framework,n,z

Addressed by: https://review.openstack.org/250200
    Introduce FakeVolume class

Gerrit topic: https://review.openstack.org/#q,topic:add_FakeVolume,n,z

Gerrit topic: https://review.openstack.org/#q,topic:extract_collist_v2,n,z

Addressed by: https://review.openstack.org/253426
    Refactor TestVolumeCreate with FakeVolume

Addressed by: https://review.openstack.org/253427
    Refactor TestVolumeList with FakeVolume

Addressed by: https://review.openstack.org/253428
    Refactor TestVolumeShow with FakeVolume

Addressed by: https://review.openstack.org/253985
    Use FakeImage in server test cases.

Addressed by: https://review.openstack.org/253986
    Use FakeVolume in server test cases.

Addressed by: https://review.openstack.org/282847
    Add some test cases for test volume set command v2

Addressed by: https://review.openstack.org/314926
    Refactor TestVolumeList with FakeVolume

Addressed by: https://review.openstack.org/315344
    Refactor TestVolumeShow with FakeVolume

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.