Skip to content

Commit 0aea2ac

Browse files
committed
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 <[email protected]>
1 parent 9e7cd66 commit 0aea2ac

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

nova/tests/fixtures/nova.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,28 @@ def setUp(self):
770770
'error', message='Evaluating non-mapped column expression',
771771
category=sqla_exc.SAWarning)
772772

773+
# NOTE(stephenfin): Disable the annoying "TypeDecorator foo will not
774+
# produce a cache key because the ``cache_ok`` flag is not set to True"
775+
# warning. It's fixed in oslo.db 10.0.0 but not before.
776+
# TODO(stephenfin): Remove once we bump oslo.db in lower-constraints to
777+
# 10.0.0
778+
warnings.filterwarnings(
779+
'ignore',
780+
message=r'TypeDecorator SoftDeleteInteger\(\) will not produce .*',
781+
category=sqla_exc.SAWarning)
782+
783+
# TODO(stephenfin): Remove once we fix this is oslo.db 10.0.1 or so
784+
warnings.filterwarnings(
785+
'ignore',
786+
message=r'Invoking and_\(\) without arguments is deprecated, .*',
787+
category=sqla_exc.SADeprecationWarning)
788+
789+
# TODO(stephenfin): Remove once we fix this in placement 5.0.2 or 6.0.0
790+
warnings.filterwarnings(
791+
'ignore',
792+
message='Implicit coercion of SELECT and textual SELECT .*',
793+
category=sqla_exc.SADeprecationWarning)
794+
773795
# TODO(jangutter): Change (or remove) this to an error during the Train
774796
# cycle when the os-vif port profile is no longer used.
775797
warnings.filterwarnings(

0 commit comments

Comments
 (0)