Merge "Add a reproduction test for bug story/2008831"

This commit is contained in:
Zuul 2021-04-20 23:17:14 +00:00 committed by Gerrit Code Review
commit 65d4a2bdb7
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())