The WalkVersionsMixin class was already removed from oslo.db, because
of removal of sqlalchemy-migrate support.
Change-Id: I952e0aed8705fd4fc0b89f6ee34f31da1b30c656
We frequently face slow nodes on the CI, and tests
are timing out because new migrations were added
in this release and the test will likely need more
time on slow nodes.
Change-Id: I41fb3936cd302d958371e2b86dd2f32cab4d612a
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
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.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I67eff8c9733500813435cde2dbda28a3c4a3ccf3
As we add more migrations in the database, the
time taken by the test increases. The test
`manila.tests.db.migrations.alembic.
test_migration.TestManilaMigrationsPostgreSQL.test_walk_versions`
runs upgrades, downgrades and database checks for
every migration. It has been timing out on numerous
occasions because it can't run under 5 minutes.
We feel the pinch of the timeouts because
the test itself is run as part of multiple
jobs (ex: unit test jobs on py2x, py3x, coverage,
requirements/lower-constraints check) and
can fail anywhere because it was running
on a "slow" node.
Change-Id: I1fdef6e907110681cb5ffb59f6f90f8eb67f118b
Partial-Bug: #1793364
Unit test 'test_walk_versions' in
'manila.tests.db.migrations.alembic.test_migration' module
takes abnormally very long time sometimes.
In common cases it takes about 5-10 seconds in CI for Mitaka set of
DB migrations.
In CI runs when this test fails, 'postgres' variant takes
about 47 seconds and mysql reaches common test timeout of 60 seconds.
Note, that this test becomes slower with each
addition of new DB migration. Also, 'pymysql' works much slower
on slow nodes than 'psycopg2'.
So, add new test decorator that sets individual test timeout.
And make it be 5 minutes for mentioned test. In worst case of Mitaka
DB migrations set it can take about 2 minutes, but make it bigger
to have a margin for future releases.
Change-Id: I233f96f29fe62231c2e7013b74c06396dd923f27
Closes-Bug: #1501272
This change adds support for share_type, share_types, and share_type_id
along side the corresponding volume_type, volume_types and
volume_type_id fields in the API. This change was made as share_type and
its references are more intuitive in comparison to volume_type.
Both entries are returned to ensure API compatibility but preference is
given to share_type[s,_id].
The database migration introduced in this change should work on MySQL
and Postgres, but will not work on SQLite. Because there is no point
in supporting SQLite, tests for it are removed.
Implements blueprint: rename-volume-type-to-share-type
Change-Id: Ifa23ee6520b5238c7de3d5bce7b7bbde02a4a61d
Module 'log' from oslo-incubator was removed after release of oslo_log library.
So, start using oslo_log, but keep oslo-incubator code yet other common modules
within Manila codebase use it.
Implements bp use-oslo-log-lib
Change-Id: I88224f7c2bd99adb78140dfc3fa73cea437f29cd
Currently Manila unit tests doesn't check how many
branches exist in db migrations, but this is extremely
important, because multiple branches break
'manila db sync' command.
Implement test, which checks that db migrations has
only one branch.
Change-Id: I4125500126ba46594a636fea38480abd0c97b519
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
oslo.messaging is the only exception because this package doesn't
currently support non-namespaced imports.
Change-Id: I3987e651bc880c8ffa7c0105df0298679dcd3a43
There's no need to translate LOG messages in the testsuite since those
will never be run in production.
Change-Id: Ifd5a427a01cdd773b83fb0a5bee0e59348650936
oslo.i18n provides the i18n function that were provided by
oslo-incubator's gettextutils module
Import _ where needed, oslo.i18n deprecated the builtin method.
Closes-Bug: #1382187
Change-Id: I12aa1c725aa4bb52a9aa46e9c3d2b303839de48b
It is expected, that unittests cover project modules in relation 1:1 and
placed in appropriate tree as main modules do.
It should be like in example:
manila/[tests/]foo/bar/[test_]modulename.py
Change-Id: I890deaeb41b87a6ae82868905144fd7477272058
Partial-Bug: #1348633