~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is a `template functional test
-<https://bugs.launchpad.net/neutron/+bug/1470678>`_ (TODO:Ann) third-party
+<http://docs.openstack.org/developer/neutron/devref/template_model_sync_test.html>`_ third-party
maintainers can use to develop tests for model-vs-migration sync in their
repos. It is recommended that each third-party CI sets up such a test, and runs
it regularly against Neutron master.
+ REPO_ARISTA_TABLES + REPO_CISCO_TABLES)
+Also the test uses **VERSION_TABLE**, it is the name of table in database which
+contains revision id of head migration. It is preferred to keep this variable in
+``networking_foo/db/migration/alembic_migrations/__init__.py`` so it will be easy
+to use in test.
+
Create a module ``networking_foo/tests/functional/db/test_migrations.py``
with the following content: ::
from neutron.tests.common import base
from neutron.tests.functional.db import test_migrations
- from networking_foo.db.migration.alembic_migrations import env
+ from networking_foo.db.migration import alembic_migrations
from networking_foo.db.models import head
# EXTERNAL_TABLES should contain all names of tables that are not related to
def include_object(self, object_, name, type_, reflected, compare_to):
if type_ == 'table' and (name == 'alembic' or
- name == env.VERSION_TABLE or
+ name == alembic_migrations.VERSION_TABLE or
name in EXTERNAL_TABLES):
return False
else: