Merge "Suppress policy deprecated warnings in tests"

This commit is contained in:
Zuul 2019-12-03 20:10:12 +00:00 committed by Gerrit Code Review
commit 1c2b7d8f01
3 changed files with 6 additions and 2 deletions

View File

@ -82,7 +82,7 @@ oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.messaging==10.3.0
oslo.middleware==3.31.0
oslo.policy==1.38.0
oslo.policy==2.3.0
oslo.privsep==1.33.2
oslo.reports==1.18.0
oslo.rootwrap==5.8.0

View File

@ -51,6 +51,10 @@ class RealPolicyFixture(fixtures.Fixture):
CONF.set_override('policy_file', self.policy_file, group='oslo_policy')
nova.policy.reset()
nova.policy.init()
# NOTE(gmann): Logging all the deprecation warning for every unit
# test will overflow the log files and leads to error. Suppress
# the deprecation warning for tests only.
nova.policy._ENFORCER.suppress_deprecation_warnings = True
self.addCleanup(nova.policy.reset)
def set_rules(self, rules, overwrite=True):

View File

@ -46,7 +46,7 @@ oslo.utils>=3.40.2 # Apache-2.0
oslo.db>=4.44.0 # Apache-2.0
oslo.rootwrap>=5.8.0 # Apache-2.0
oslo.messaging>=10.3.0 # Apache-2.0
oslo.policy>=1.38.0 # Apache-2.0
oslo.policy>=2.3.0 # Apache-2.0
oslo.privsep>=1.33.2 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.service>=1.40.1 # Apache-2.0