tests: Silence SQLAlchemy warnings

While we wait for keystone to merge the patch to unblock oslo.db 10.0.0,
silence these warnings from newer versions of SQLAlchemy. TODOs are left
since we don't want to keep these around forever.

Change-Id: If48dd949ec4d69a09c87178f16d56a2517e21fd8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2021-07-15 10:42:06 +01:00
parent 9e7cd66869
commit 0aea2ac903

View File

@@ -770,6 +770,28 @@ class WarningsFixture(fixtures.Fixture):
'error', message='Evaluating non-mapped column expression',
category=sqla_exc.SAWarning)
# NOTE(stephenfin): Disable the annoying "TypeDecorator foo will not
# produce a cache key because the ``cache_ok`` flag is not set to True"
# warning. It's fixed in oslo.db 10.0.0 but not before.
# TODO(stephenfin): Remove once we bump oslo.db in lower-constraints to
# 10.0.0
warnings.filterwarnings(
'ignore',
message=r'TypeDecorator SoftDeleteInteger\(\) will not produce .*',
category=sqla_exc.SAWarning)
# TODO(stephenfin): Remove once we fix this is oslo.db 10.0.1 or so
warnings.filterwarnings(
'ignore',
message=r'Invoking and_\(\) without arguments is deprecated, .*',
category=sqla_exc.SADeprecationWarning)
# TODO(stephenfin): Remove once we fix this in placement 5.0.2 or 6.0.0
warnings.filterwarnings(
'ignore',
message='Implicit coercion of SELECT and textual SELECT .*',
category=sqla_exc.SADeprecationWarning)
# TODO(jangutter): Change (or remove) this to an error during the Train
# cycle when the os-vif port profile is no longer used.
warnings.filterwarnings(