Skip to content

Commit 3545356

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "tests: Silence SQLAlchemy warnings"
2 parents 8354a75 + 0aea2ac commit 3545356

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)