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:
parent
31815fbab4
commit
d91094deac
|
@ -353,7 +353,10 @@ ComputeFeaturesGroup = [
|
||||||
"serial console output?"),
|
"serial console output?"),
|
||||||
cfg.BoolOpt('resize',
|
cfg.BoolOpt('resize',
|
||||||
default=False,
|
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',
|
cfg.BoolOpt('pause',
|
||||||
default=True,
|
default=True,
|
||||||
help="Does the test environment support pausing?"),
|
help="Does the test environment support pausing?"),
|
||||||
|
|
|
@ -185,9 +185,6 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
|
||||||
@test.services('compute', 'network')
|
@test.services('compute', 'network')
|
||||||
def test_server_connectivity_resize(self):
|
def test_server_connectivity_resize(self):
|
||||||
resize_flavor = CONF.compute.flavor_ref_alt
|
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()
|
keypair = self.create_keypair()
|
||||||
server = self._setup_server(keypair)
|
server = self._setup_server(keypair)
|
||||||
floating_ip = self._setup_network(server, keypair)
|
floating_ip = self._setup_network(server, keypair)
|
||||||
|
|
|
@ -45,11 +45,6 @@ class TestServerAdvancedOps(manager.ScenarioTest):
|
||||||
@decorators.idempotent_id('e6c28180-7454-4b59-b188-0257af08a63b')
|
@decorators.idempotent_id('e6c28180-7454-4b59-b188-0257af08a63b')
|
||||||
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
@testtools.skipUnless(CONF.compute_feature_enabled.resize,
|
||||||
'Resize is not available.')
|
'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')
|
@test.services('compute', 'volume')
|
||||||
def test_resize_volume_backed_server_confirm(self):
|
def test_resize_volume_backed_server_confirm(self):
|
||||||
# We create an instance for use in this test
|
# We create an instance for use in this test
|
||||||
|
|
Loading…
Reference in New Issue