Suppress some test warnings

Because we capture stderr during test runs we see warnings that we
have no ability to really impact. 3 of these should just be further
suppressed.

1) Anything dealing with pkg_resources, we consume this through
intermediary layers only, and these warnings have been around forever.

2) Policy enforcement warnings, as is_admin was deprecated well before
there was a transition forward.

3) Anything out of mox3. We're just trying to delete this. No one is
fixing that module as it's effectively dead.

Change-Id: I5eaf953b6a2b0a3efe215f776aa048433b192e90
This commit is contained in:
Sean Dague 2017-07-24 13:15:30 -04:00
parent 9d2c7c28d5
commit 8d571261fb

@ -718,6 +718,21 @@ class WarningsFixture(fixtures.Fixture):
warnings.filterwarnings('ignore',
message='With-statements now directly support'
' multiple context managers')
# NOTE(sdague): nova does not use pkg_resources directly, this
# is all very long standing deprecations about other tools
# using it. None of this is useful to Nova development.
warnings.filterwarnings('ignore',
module='pkg_resources')
# NOTE(sdague): this remains an unresolved item around the way
# forward on is_admin, the deprecation is definitely really premature.
warnings.filterwarnings('ignore',
message='Policy enforcement is depending on the value of is_admin.'
' This key is deprecated. Please update your policy '
'file to use the standard policy values.')
# NOTE(sdague): mox3 is on life support, don't really care
# about any deprecations coming from it
warnings.filterwarnings('ignore',
module='mox3.mox')
self.addCleanup(warnings.resetwarnings)