libvirt: Cleanup test_create_configdrive

This test made a tortured trip into _create_image_helper without using
much of its functionality. We pull this out and have it call
_create_configdrive directly.

This leaves _create_image_helper with only a single caller:
test_create_image_with_flavor_swap. This test is almost identical in
purpose to the much better test_create_image_with_swap and
test_create_image_with_legacy_swap_resizing. We refactor
test_create_image_with_swap to use ddt to cover all 3 cases, and
remove _create_image_helper.

This introduces the first use of ddt in Nova tests. It is already in
global-requirements. It was approved for use in Nova tests during the
Ocata contributor meetup:

  https://etherpad.openstack.org/p/ocata-nova-summit-meetup

Change-Id: I9d26ae3c26bab20ae60c2db011194ac0b2ead555
This commit is contained in:
Matthew Booth
2016-07-07 15:29:45 +01:00
parent a475b12703
commit 2d886ec913
2 changed files with 59 additions and 106 deletions
+1
View File
@@ -4,6 +4,7 @@
hacking<0.11,>=0.10.0
coverage>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0 # BSD
mox3>=0.7.0 # Apache-2.0