Remove skip condition when resize is enable

This commit removes the skip condition with flavor_ref and
flavor_ref_alt when the resize feature is enable. Because when
resize feature is enable, the flavor_ref and flavor_ref_alt should be
set properly, otherwise, it is a misconfiguration. So we should fail
but not skip at the situation.

And This commit also add a help message for the resize config to avoid
users confusing.

Change-Id: I8eab2e57eb77e7a1a8dae7ffd63ec95ae6a026c3
This commit is contained in:
Masayuki Igawa 2017-04-12 16:20:09 +09:00
parent 31815fbab4
commit d91094deac
No known key found for this signature in database
GPG Key ID: 251CCDE9053850E4
3 changed files with 4 additions and 9 deletions

View File

@ -353,7 +353,10 @@ ComputeFeaturesGroup = [
"serial console output?"),
cfg.BoolOpt('resize',
default=False,
help="Does the test environment support resizing?"),
help="Does the test environment support resizing? When you "
"enable this feature, 'flavor_ref_alt' should be set and "
"it should refer to a larger flavor than 'flavor_ref' "
"one."),
cfg.BoolOpt('pause',
default=True,
help="Does the test environment support pausing?"),

View File

@ -185,9 +185,6 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
@test.services('compute', 'network')
def test_server_connectivity_resize(self):
resize_flavor = CONF.compute.flavor_ref_alt
if resize_flavor == CONF.compute.flavor_ref:
msg = "Skipping test - flavor_ref and flavor_ref_alt are identical"
raise self.skipException(msg)
keypair = self.create_keypair()
server = self._setup_server(keypair)
floating_ip = self._setup_network(server, keypair)

View File

@ -45,11 +45,6 @@ class TestServerAdvancedOps(manager.ScenarioTest):
@decorators.idempotent_id('e6c28180-7454-4b59-b188-0257af08a63b')
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
'Resize is not available.')
@testtools.skipUnless(CONF.compute.flavor_ref !=
CONF.compute.flavor_ref_alt
and CONF.compute.flavor_ref_alt != "",
'The flavor_ref_alt option should not be empty and '
'should not be identical with flavor_ref')
@test.services('compute', 'volume')
def test_resize_volume_backed_server_confirm(self):
# We create an instance for use in this test