Skip root state inherting scenario tests for Redis

Redis instances does not inherit root state from backups, and this
feature is also not suitable for it, because Redis actually does not
have a user account management system. The "root password" for Redis
instance is just a configuration parameter for the underlying server.
So all scenario tests about checking root state inheritance should be
skipped.

Further investigations should also be done to the root API for Redis
datastore: we may have to delete the RootHistory database record when
disabling root, in this way the user could tell the underlying Redis
server is not enabling AUTH currently, this could make less confusion
for the end users. However if we're going this direction, we should
also make it clear that the RootHistory records mean different things
for different datastore types.

Change-Id: I988fcd906e074e591ccc1c60f09139df94814b5b
This commit is contained in:
Zhao Chao 2018-03-02 21:40:48 +08:00
parent 36ad74c058
commit 242761eaf4
3 changed files with 20 additions and 1 deletions

View File

@ -400,12 +400,18 @@ register(
# cluster_root_actions_groups, ]
)
# Redis instances does not support inherit root state from backups,
# so a customized root actions group is created, instance backuping
# and restoring tests will not be included.
redis_root_actions_groups = list(instance_create_groups)
redis_root_actions_groups.extend([groups.ROOT_ACTION_ENABLE,
groups.ROOT_ACTION_DISABLE])
register(
["redis_supported"],
single=[common_groups,
backup_groups,
configuration_groups,
root_actions_groups, ],
redis_root_actions_groups, ],
multi=[replication_promote_groups, ]
# multi=[cluster_actions_groups,
# cluster_negative_actions_groups,

View File

@ -78,6 +78,7 @@ class RootActionsEnableGroup(TestGroup):
@test(depends_on=[check_root_enabled])
def backup_root_enabled_instance(self):
"""Backup the root-enabled instance."""
self.test_runner.check_inherit_root_state_supported()
self.backup_runner.run_backup_create()
self.backup_runner.run_backup_create_completed()
@ -126,6 +127,7 @@ class RootActionsDisableGroup(TestGroup):
def backup_root_disabled_instance(self):
"""Backup the root-disabled instance."""
self.test_runner.check_root_disable_supported()
self.test_runner.check_inherit_root_state_supported()
self.backup_runner2.run_backup_create()
self.backup_runner2.run_backup_create_completed()

View File

@ -177,6 +177,10 @@ class RootActionsRunner(TestRunner):
"""Throw SkipTest if root-disable is not supported."""
pass
def check_inherit_root_state_supported(self):
"""Throw SkipTest if inherting root state is not supported."""
pass
class PerconaRootActionsRunner(RootActionsRunner):
@ -231,3 +235,10 @@ class CouchbaseRootActionsRunner(RootActionsRunner):
def run_delete_root(self):
raise SkipKnownBug(runners.BUG_WRONG_API_VALIDATION)
class RedisRootActionsRunner(RootActionsRunner):
def check_inherit_root_state_supported(self):
raise SkipTest("Redis instances does not inherit root state "
"from backups.")