diff options
author | Zuul <zuul@review.opendev.org> | 2023-04-17 15:38:16 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-04-17 15:38:16 +0000 |
commit | a7c03ba9de6f9a98aa5c36a67e1ecfab77acde9a (patch) | |
tree | bacfd036580f6a4d8aafb4ac95ce35a0cf2b0c84 | |
parent | b557c6a30cfcdbb4673dbfdb29f40c68d9d190b0 (diff) | |
parent | af5392bf3fcf032ed376e5e49dff485f875c0a57 (diff) | |
download | oslo-db-a7c03ba9de6f9a98aa5c36a67e1ecfab77acde9a.tar.gz |
Merge "Add release note for base test class removal"13.0.0
-rw-r--r-- | oslo_db/sqlalchemy/enginefacade.py | 2 | ||||
-rw-r--r-- | oslo_db/sqlalchemy/test_fixtures.py | 8 | ||||
-rw-r--r-- | releasenotes/notes/remove-base-test-classes-557889ec4f072781.yaml | 24 |
3 files changed, 29 insertions, 5 deletions
diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py index 39fb061..c01c230 100644 --- a/oslo_db/sqlalchemy/enginefacade.py +++ b/oslo_db/sqlalchemy/enginefacade.py @@ -553,7 +553,7 @@ class _TestTransactionFactory(_TransactionFactory): Note that while this is used by oslo.db's own tests of the enginefacade system, it is also exported for use by the test suites of other projects, first as an element of the - oslo_db.sqlalchemy.test_base module, and secondly may be used by + oslo_db.sqlalchemy.test_fixtures module, and secondly may be used by external test suites directly. Includes a feature to inject itself temporarily as the factory diff --git a/oslo_db/sqlalchemy/test_fixtures.py b/oslo_db/sqlalchemy/test_fixtures.py index f7157c0..c65cb07 100644 --- a/oslo_db/sqlalchemy/test_fixtures.py +++ b/oslo_db/sqlalchemy/test_fixtures.py @@ -546,9 +546,9 @@ def optimize_package_test_loader(file_): The function is invoked as:: - from oslo_db.sqlalchemy import test_base + from oslo_db.sqlalchemy import test_fixtures - load_tests = test_base.optimize_package_test_loader(__file__) + load_tests = test_fixtures.optimize_package_test_loader(__file__) The loader *must* be present in the package level __init__.py. @@ -586,9 +586,9 @@ def optimize_module_test_loader(): The function is invoked as:: - from oslo_db.sqlalchemy import test_base + from oslo_db.sqlalchemy import test_fixtures - load_tests = test_base.optimize_module_test_loader() + load_tests = test_fixtures.optimize_module_test_loader() The loader *must* be present in an individual module, and *not* the package level __init__.py. diff --git a/releasenotes/notes/remove-base-test-classes-557889ec4f072781.yaml b/releasenotes/notes/remove-base-test-classes-557889ec4f072781.yaml new file mode 100644 index 0000000..1fb1381 --- /dev/null +++ b/releasenotes/notes/remove-base-test-classes-557889ec4f072781.yaml @@ -0,0 +1,24 @@ +--- +upgrade: + - | + The following test fixtures and base test classes were deprecated and have + now been removed: + + - ``oslo_db.sqlalchemy.test_base.DbFixture`` + - ``oslo_db.sqlalchemy.test_base.DbTestCase`` + - ``oslo_db.sqlalchemy.test_base.OpportunisticTestCase`` + - ``oslo_db.sqlalchemy.test_base.MySQLOpportunisticFixture`` + - ``oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticFixture`` + - ``oslo_db.sqlalchemy.test_base.MySQLOpportunisticTestCase`` + - ``oslo_db.sqlalchemy.test_base.PostgreSQLOpportunisticTestCase`` + + They have all been replaced by equivalent test fixtures and test class + mixins in ``oslo_db.sqlalchemy.test_fixtures``. + + In addition, the following test cases were being inadvertently used + publicly despite being private to oslo.db. They were also deprecated and + have now been removed: + + - ``oslo_db.tests.sqlalchemy.base.DbTestCase`` + - ``oslo_db.tests.sqlalchemy.base.MySQLOpportunisticTestCase`` + - ``oslo_db.tests.sqlalchemy.base.PostgreSQLOpportunisticTestCase`` |