Merge "Fixed module-apply on removed module"
This commit is contained in:
commit
654a1a228e
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- Fixed issue where module-apply after module-remove
|
||||||
|
caused module-query to skip reporting on that
|
||||||
|
module. Bug 1571799
|
@ -31,7 +31,7 @@ LOG = logging.getLogger(__name__)
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
class ModuleManager():
|
class ModuleManager(object):
|
||||||
"""This is a Manager utility class (mixin) for managing module-related
|
"""This is a Manager utility class (mixin) for managing module-related
|
||||||
tasks.
|
tasks.
|
||||||
"""
|
"""
|
||||||
@ -72,6 +72,7 @@ class ModuleManager():
|
|||||||
status = 'OK' if applied else 'ERROR'
|
status = 'OK' if applied else 'ERROR'
|
||||||
admin_only = (not visible or tenant == cls.MODULE_APPLY_TO_ALL or
|
admin_only = (not visible or tenant == cls.MODULE_APPLY_TO_ALL or
|
||||||
auto_apply)
|
auto_apply)
|
||||||
|
result['removed'] = None
|
||||||
result['status'] = status
|
result['status'] = status
|
||||||
result['message'] = message
|
result['message'] = message
|
||||||
result['updated'] = now
|
result['updated'] = now
|
||||||
|
@ -397,8 +397,35 @@ class ModuleInstanceGroup(TestGroup):
|
|||||||
self.test_runner.run_module_query_empty()
|
self.test_runner.run_module_query_empty()
|
||||||
|
|
||||||
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
||||||
depends_on=[create_inst_with_mods],
|
depends_on=[module_remove],
|
||||||
runs_after=[module_query_empty_after])
|
runs_after=[module_query_empty_after])
|
||||||
|
def module_apply_again(self):
|
||||||
|
"""Check that module-apply works a second time."""
|
||||||
|
self.test_runner.run_module_apply()
|
||||||
|
|
||||||
|
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
||||||
|
depends_on=[module_apply],
|
||||||
|
runs_after=[module_query_empty_after])
|
||||||
|
def module_query_after_apply_again(self):
|
||||||
|
"""Check that module-query works after second apply."""
|
||||||
|
self.test_runner.run_module_query_after_apply()
|
||||||
|
|
||||||
|
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
||||||
|
depends_on=[module_apply_again],
|
||||||
|
runs_after=[module_query_after_apply_again])
|
||||||
|
def module_remove_again(self):
|
||||||
|
"""Check that module-remove works again."""
|
||||||
|
self.test_runner.run_module_remove()
|
||||||
|
|
||||||
|
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
||||||
|
depends_on=[module_remove_again])
|
||||||
|
def module_query_empty_after_again(self):
|
||||||
|
"""Check that the instance has no modules applied after remove."""
|
||||||
|
self.test_runner.run_module_query_empty()
|
||||||
|
|
||||||
|
@test(groups=[GROUP, GROUP_MODULE_INSTANCE],
|
||||||
|
depends_on=[create_inst_with_mods],
|
||||||
|
runs_after=[module_query_empty_after_again])
|
||||||
def wait_for_inst_with_mods(self):
|
def wait_for_inst_with_mods(self):
|
||||||
"""Wait for create instance with modules to finish."""
|
"""Wait for create instance with modules to finish."""
|
||||||
self.test_runner.run_wait_for_inst_with_mods()
|
self.test_runner.run_wait_for_inst_with_mods()
|
||||||
|
Loading…
Reference in New Issue
Block a user