Add a reproduction test for bug story/2008831

Story: 2008831
Task: 42313

Change-Id: I01b66ad1828cff77adf3aa7490e54be817b8b71b
(cherry picked from commit 9ea3d9b215)
This commit is contained in:
Balazs Gibizer 2021-04-20 18:29:02 +02:00
parent 6bb8ff5b7e
commit cb77dc8f8c
1 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ class UpgradeCheckIncompleteConsumersTestCase(
super(UpgradeCheckIncompleteConsumersTestCase, self).setUp()
config = cfg.ConfigOpts()
conf.register_opts(config)
config(args=[], project='placement')
self.checks = status.Checks(config)
def test_check_incomplete_consumers(self):
@ -78,3 +79,9 @@ class UpgradeCheckIncompleteConsumersTestCase(
# Run the check again and it should be successful.
result = self.checks._check_root_provider_ids()
self.assertEqual(upgradecheck.Code.SUCCESS, result.code)
def test_all_registered_check_is_runnable(self):
# this is bug story/2008831
self.assertRaises(cfg.NotInitializedError, self.checks.check)
# after it is fixed we expect that all the checks succeeds
# self.assertEquals(upgradecheck.Code.SUCCESS, self.checks.check())