Commit Graph

4 Commits

Author SHA1 Message Date
Zuul f094b7d2b2 Merge "tests: Remove use of 'oslo_db.sqlalchemy.test_base'" 2021-08-25 11:30:09 +00:00
Stephen Finucane f374022359 Resolve compatibility with oslo.db future
Change I468048c01455d9dfe12004736c181806dc218e37 in oslo.db means that
the table returned from 'oslo_db.utils.get_table' is no longer bound to
a 'Connection' or 'Engine'. Get out ahead of this breaking change by
creating out own 'Connection' as part of the test. Note that we use
'Connection.execute' instead of 'Engine.execute' as the latter is
deprecated in SQLAlchemy 1.4 for removal in 2.0.

Related-Bug: #1939716

Change-Id: I957d2a9d7c875120bed0022ce1e953b2ec9f97cd
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-08-12 15:39:34 +00:00
Stephen Finucane 815922fbee tests: Remove use of 'oslo_db.sqlalchemy.test_base'
The various test cases and mixins in 'oslo_db.sqlalchemy.test_base' have
been deprecated since oslo.db 4.34.0 (March 2018). Remove use of these.

Change-Id: I6618366e6464d569a86fb027919be2e1825e438c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-07-28 16:40:17 +01:00
Hemanth Makkapati 95c7c1b753 Refactor tests to use Alembic to run migrations
* Functional tests now use alembic instead of sqlalchmey-migrate
  to build and destroy test database.
* All tests now use a file-based sqlite db as opposed to an in-memory
  database.

Partially-Implements: blueprint alembic-migrations
Change-Id: I77921366a05ba6f9841143af89c1f4059d8454c6
Depends-On: Ie8594ff339a13bf190aefa308f54e97ee20ecfa2
2017-02-01 16:08:17 -06:00