]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Ensure no "db" related functional/fullstack tests are skipped in the gate
authorCedric Brandily <zzelle@gmail.com>
Tue, 9 Jun 2015 16:00:58 +0000 (16:00 +0000)
committerCedric Brandily <zzelle@gmail.com>
Mon, 15 Jun 2015 09:18:03 +0000 (11:18 +0200)
commitb370c69b75fe38cd285512f9516ce428e8a806dd
treeb35c73f37f2db43e3cfbb7a2c23ed05a046e166a
parent278a5fce29504c43d669feed210f7b3627616e22
Ensure no "db" related functional/fullstack tests are skipped in the gate

Currently neutron uses MySQLTestCase[1] and
PostgreSQLOpportunisticTestCase[2] for functional and fullstack tests
using a real MySQL/PostgreSQL database. These classes skip tests when
the db is unavailable (db not installed/configured, missing packages,
etc.) which is fine when tests are runned by developers but not when
runned by the gate jobs.

This change updates MySQLTestCase[1] and defines PostgreSQLTestCase[1]
as PostgreSQL oslo.db test class wrapper: when the db is unavailable,
these classes ensure tests will:

* fail in the gate (dsvm-functional, dsvm-fullstack jobs),
* be skipped by default otherwise (functional, fullstack jobs).

[1] neutron.tests.common.base
[2] oslo_db.sqlalchemy.test_base

Closes-Bug: #1404093
Change-Id: I77b12e728ce9a7b0222c3df081842635f6375a3e
neutron/tests/common/base.py
neutron/tests/functional/db/test_ipam.py
neutron/tests/functional/db/test_migrations.py