Remove redundant revert-to-snapshot test option
This option is used to control how revert-to-snapshot extra-spec is used when creating a share type for several tests, but for the same tests, it is more appropriate to either not create a share-type (thus use the default or "don't care" behavior) or do so based on the value of run_revert_to_snapshot_tests. TrivialFix Change-Id: Ie8a0030a896634eb8deaff17ea72371419eecdea
This commit is contained in:
parent
595a2bd73c
commit
30403d05bf
@ -276,10 +276,6 @@ iniset $TEMPEST_CONFIG share run_mount_snapshot_tests $RUN_MANILA_MOUNT_SNAPSHOT
|
||||
# Create share from snapshot support
|
||||
iniset $TEMPEST_CONFIG share capability_create_share_from_snapshot_support $CAPABILITY_CREATE_SHARE_FROM_SNAPSHOT_SUPPORT
|
||||
|
||||
# Revert share to snapshot support
|
||||
CAPABILITY_REVERT_TO_SNAPSHOT_SUPPORT=${CAPABILITY_REVERT_TO_SNAPSHOT_SUPPORT:-$RUN_MANILA_REVERT_TO_SNAPSHOT_TESTS}
|
||||
iniset $TEMPEST_CONFIG share capability_revert_to_snapshot_support $CAPABILITY_REVERT_TO_SNAPSHOT_SUPPORT
|
||||
|
||||
iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4
|
||||
iniset $TEMPEST_CONFIG validation network_for_ssh ${PRIVATE_NETWORK_NAME:-"private"}
|
||||
|
||||
|
@ -104,6 +104,10 @@ ShareGroup = [
|
||||
"False if the driver being tested does not support "
|
||||
"creating shares from snapshots."),
|
||||
cfg.BoolOpt("capability_revert_to_snapshot_support",
|
||||
deprecated_for_removal=True,
|
||||
deprecated_reason="Redundant configuration option. Please use "
|
||||
"'run_revert_to_snapshot_tests' config "
|
||||
"option instead.",
|
||||
help="Defines extra spec that satisfies specific back end "
|
||||
"capability called 'revert_to_snapshot_support' "
|
||||
"and will be used for setting up custom share type. "
|
||||
|
@ -50,12 +50,6 @@ class ManilaTempestPlugin(plugins.TempestPlugin):
|
||||
conf.share.run_snapshot_tests,
|
||||
group="share",
|
||||
)
|
||||
if conf.share.capability_revert_to_snapshot_support is None:
|
||||
conf.set_default(
|
||||
"capability_revert_to_snapshot_support",
|
||||
conf.share.run_revert_to_snapshot_tests,
|
||||
group="share",
|
||||
)
|
||||
|
||||
def get_opt_lists(self):
|
||||
return [(config_share.share_group.name, config_share.ShareGroup),
|
||||
|
@ -763,8 +763,6 @@ class BaseSharesTest(test.BaseTestCase):
|
||||
CONF.share.capability_snapshot_support)
|
||||
create_from_snapshot_support = six.text_type(
|
||||
CONF.share.capability_create_share_from_snapshot_support)
|
||||
revert_to_snapshot_support = six.text_type(
|
||||
CONF.share.capability_revert_to_snapshot_support)
|
||||
|
||||
extra_specs_dict = {
|
||||
"driver_handles_share_servers": dhss,
|
||||
@ -773,7 +771,6 @@ class BaseSharesTest(test.BaseTestCase):
|
||||
optional = {
|
||||
"snapshot_support": snapshot_support,
|
||||
"create_share_from_snapshot_support": create_from_snapshot_support,
|
||||
"revert_to_snapshot_support": revert_to_snapshot_support,
|
||||
}
|
||||
# NOTE(gouthamr): In micro-versions < 2.24, snapshot_support is a
|
||||
# required extra-spec
|
||||
|
@ -37,9 +37,6 @@ class RevertToSnapshotTest(base.BaseSharesMixedTest):
|
||||
if not CONF.share.run_revert_to_snapshot_tests:
|
||||
msg = "Revert to snapshot tests are disabled."
|
||||
raise cls.skipException(msg)
|
||||
if not CONF.share.capability_revert_to_snapshot_support:
|
||||
msg = "Revert to snapshot support is disabled."
|
||||
raise cls.skipException(msg)
|
||||
if not CONF.share.capability_snapshot_support:
|
||||
msg = "Snapshot support is disabled."
|
||||
raise cls.skipException(msg)
|
||||
@ -85,8 +82,10 @@ class RevertToSnapshotTest(base.BaseSharesMixedTest):
|
||||
cls.share_zone = cls.zones[0]
|
||||
cls.replica_zone = cls.zones[-1]
|
||||
|
||||
extra_specs = cls.add_extra_specs_to_dict(
|
||||
{"replication_type": cls.replication_type})
|
||||
extra_specs = cls.add_extra_specs_to_dict({
|
||||
"replication_type": cls.replication_type,
|
||||
constants.REVERT_TO_SNAPSHOT_SUPPORT: True,
|
||||
})
|
||||
share_type = cls.create_share_type(
|
||||
cls.replicated_share_type_name,
|
||||
extra_specs=extra_specs,
|
||||
|
@ -37,9 +37,6 @@ class RevertToSnapshotNegativeTest(base.BaseSharesMixedTest):
|
||||
if not CONF.share.run_revert_to_snapshot_tests:
|
||||
msg = "Revert to snapshot tests are disabled."
|
||||
raise cls.skipException(msg)
|
||||
if not CONF.share.capability_revert_to_snapshot_support:
|
||||
msg = "Revert to snapshot support is disabled."
|
||||
raise cls.skipException(msg)
|
||||
if not CONF.share.capability_snapshot_support:
|
||||
msg = "Snapshot support is disabled."
|
||||
raise cls.skipException(msg)
|
||||
|
Loading…
Reference in New Issue
Block a user