nova/nova/tests/unit/db
Matt Riedemann e2c2b1d586 Fix joins in instance_get_all_by_host
Some callers of instance_get_all_by_host are passing
in columns_to_join=[], like the _sync_scheduler_instance_info
periodic task in the compute manager, to avoid unnecessary
joins with other tables.

The problem was columns_to_join wasn't being passed through
to _instance_get_all_query which builds the actual query
method, and defaults to join on info_cache and security_groups.

This fixes the problem by passing through columns_to_join and
provides tests to show it working both with and without the joins.

Change-Id: I69f2ddca8fb0935e03b0f426891d01360940a85a
Closes-Bug: #1680616
(cherry picked from commit d52bcc616f)
2017-10-30 21:34:03 -04:00
..
__init__.py move all tests to nova/tests/unit 2014-11-12 15:31:08 -05:00
fakes.py Trivial-Fix: Fix typos 2016-06-13 06:41:08 +00:00
test_db_api.py Fix joins in instance_get_all_by_host 2017-10-30 21:34:03 -04:00
test_migration_utils.py Unwind circular import issue with api / utils 2016-09-27 15:05:56 -04:00
test_migrations.py Add index on instances table across project_id and updated_at 2016-11-22 01:40:38 +00:00
test_models.py Test that new tables don't use soft deletes 2016-02-04 09:21:31 -05:00
test_sqlalchemy_migration.py Fix mitaka online migration for PCI devices 2017-04-20 15:13:13 -07:00