Unit tests run on old db schema

Bug #1621449 reported by Boris Bobrov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Invalid
Undecided
Unassigned

Bug Description

On current master (6a93e9b) most of unit tests do not run on new schema. For example, for test keystone.tests.unit.assignment.role_backends.test_sql.SqlRole.test_role_crud migration contract_repo/versions/002_password_created_at_not_nullable.py never gets applied.

Keystone should run all migrations for a test prior to the test's execution.

Revision history for this message
Boris Bobrov (bbobrov) wrote :

Bug https://bugs.launchpad.net/keystone/+bug/1620764 probably happens because of this one.

Revision history for this message
Steve Martinelli (stevemar) wrote :

let's get this fixed for rc1

Changed in keystone:
milestone: none → newton-rc1
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Boris Bobrov (bbobrov) wrote :

Sorry, but the bug is invalid. The migrations should not run for unit tests. The tables get created from scratch for every test: keystone/common/sql/contract_repo/versions/002_password_created_at_not_nullable.py .

Changed in keystone:
status: Confirmed → Invalid
Changed in keystone:
milestone: newton-rc1 → none
importance: High → Wishlist
importance: Wishlist → Undecided
Revision history for this message
Boris Bobrov (bbobrov) wrote :

Oops, wrong copypaste above. It should be: the tables get created from scratch for every test: https://github.com/openstack/keystone/blob/master/keystone/tests/unit/ksfixtures/database.py#L154

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.