Fixing 'test_verify_created_server_ephemeral_disk' test
The 'test_verify_created_server_ephemeral_disk' test has been recently broken by the patch [1]. The traceback can be found in logs of the 'gate-tempest-dsvm-neutron-full-ssh' job [2]. The test fails with error [3]. When we create a flavor with no ephemeral disk, the 'ephemeral' argument is unexpected. So we don't need to pass the 'ephemeral' argument to the 'create_flavor' method when we create a flavor with no ephemeral disk. [1] https://review.openstack.org/#/c/390198/ [2] http://logs.openstack.org/98/390198/2/check/gate-tempest-dsvm-neutron-full-ssh/fef3bfd/logs/testr_results.html.gz [3] http://paste.openstack.org/show/587678/ Change-Id: I0cdbba827640d09d7b1fb8e1f3c0b56013a5d3a6
This commit is contained in:
parent
0172bf9794
commit
f9103443cd
@ -265,22 +265,24 @@ class ServersWithSpecificFlavorTestJSON(base.BaseV2ComputeAdminTest):
|
||||
self.flavor_ref)['flavor']
|
||||
|
||||
def create_flavor_with_ephemeral(ephem_disk):
|
||||
if ephem_disk > 0:
|
||||
flavor_name = data_utils.rand_name('eph_flavor')
|
||||
else:
|
||||
flavor_name = data_utils.rand_name('no_eph_flavor')
|
||||
flavor_with_eph_disk_id = data_utils.rand_int_id(start=1000)
|
||||
|
||||
ram = flavor_base['ram']
|
||||
vcpus = flavor_base['vcpus']
|
||||
disk = flavor_base['disk']
|
||||
|
||||
if ephem_disk > 0:
|
||||
# Create a flavor with ephemeral disk
|
||||
flavor = (self.flavor_client.
|
||||
create_flavor(name=flavor_name,
|
||||
ram=ram, vcpus=vcpus, disk=disk,
|
||||
id=flavor_with_eph_disk_id,
|
||||
ephemeral=ephem_disk))['flavor']
|
||||
flavor_name = data_utils.rand_name('eph_flavor')
|
||||
flavor = self.flavor_client.create_flavor(
|
||||
name=flavor_name, ram=ram, vcpus=vcpus, disk=disk,
|
||||
id=flavor_with_eph_disk_id, ephemeral=ephem_disk)['flavor']
|
||||
else:
|
||||
# Create a flavor without ephemeral disk
|
||||
flavor_name = data_utils.rand_name('no_eph_flavor')
|
||||
flavor = self.flavor_client.create_flavor(
|
||||
name=flavor_name, ram=ram, vcpus=vcpus, disk=disk,
|
||||
id=flavor_with_eph_disk_id)['flavor']
|
||||
self.addCleanup(flavor_clean_up, flavor['id'])
|
||||
|
||||
return flavor['id']
|
||||
|
Loading…
Reference in New Issue
Block a user