Merge "Remove redundant revert-to-snapshot test option"

This commit is contained in:
Jenkins 2017-03-18 11:25:10 +00:00 committed by Gerrit Code Review
commit a7c7439ddc
6 changed files with 8 additions and 21 deletions

View File

@ -280,10 +280,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"}

View File

@ -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. "

View File

@ -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),

View File

@ -805,8 +805,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,
@ -815,7 +813,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

View File

@ -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,

View File

@ -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)