Add missing tests in test_db_api
The goal of this bp is to add missing tests for a lot of methods in nova.db.api
At least we should add missing tests for methods that have session parameter that should be removed in bp db-session-cleanup. For example security_groups.
Blueprint information
- Status:
- Complete
- Approver:
- Russell Bryant
- Priority:
- High
- Drafter:
- Boris Pavlovic
- Direction:
- Approved
- Assignee:
- Boris Pavlovic
- Definition:
- Approved
- Series goal:
- Accepted for havana
- Implementation:
-
Implemented
- Milestone target:
-
2013.2
- Started by
- Boris Pavlovic
- Completed by
- Russell Bryant
Whiteboard
May be useful to look at a code coverage report, eg:
http://
Oneliner to get list of all functions in db.api that are never called from test_db_api:
for i in `cat nova/db/api.py | grep "def " | tr '(' ' ' | awk '{ print $2}'`; do echo -n "$i " ; echo `cat nova/tests/
There are two types of groups that haven't tests:
a) important - if it has methods with session parameter that should be removed in db-session-cleanup or race condition in create, update methods.
b) not-so-important - If there is no session parameter and they doesn't have tests
Important groups should be fixed first:
⬥ IMPORTANT:
✓ floating_ip_* (race, session )
✓ fixed_ip_*
✓ securty_group_* (session)
✓ service_*
✓ security_
✓ instance_type_* (race, session)
✓ instance_
✓ block_device_* (unnecessary calls of get_session method)
✓ key_pair_* (race)
✓ virtual_interface_* (bug 1062097)
✓ network_* (sesion)
✓ agent_build_* (session)
✓ reservation_*
✓ instance_metadata_* (session)
✓ insatance_
✓ instance_fault_*
✓ instance_action_*
⚒ instance_* (session)
⚒ migration_* (session, race)
⬥ NOT-SO-IMPORTANT:
✓ instance_
✓ quota_*
✓ quota_class_*
✓ s3_image_*
✓ compute_node_*
✓ certificate_*
✓ provider_fw_rule_*
✓ console_pool_*
⚒ console_*
✓ cell_*
⚒ dnsdomain_*
⚒ bw_usage_*
⚒ *ec2*
Gerrit topic: https:/
Addressed by: https:/
Add mising tests for db.block_
Gerrit topic: https:/
Addressed by: https:/
Add missing tests for db.virtual_
Gerrit topic: https:/
Addressed by: https:/
Add missing tests for db.service_* methods
Gerrit topic: https:/
Addressed by: https:/
Add missing tests for db.instance_type_* methods
Addressed by: https:/
Add missing tests for db.instance_
Addressed by: https:/
Add missing tests for instance_
Addressed by: https:/
Add unit tests for /db/api.
Gerrit topic: https:/
Addressed by: https:/
Add missing test for db.instance_
Gerrit topic: https:/
Addressed by: https:/
Move db.fixed_ip_* tests from DbApiTestCase to FixedIpTestCase
Addressed by: https:/
Add missing tests for db.floating_ip_* methods
Addressed by: https:/
Moved sample network creation out of unittest base class constructor.
Addressed by: https:/
Add missing tests for nova.db.
Addressed by: https:/
Add missing tests for nova.db.
Addressed by: https:/
Add missing tests for nova.db.api.quota_* methods
Gerrit topic: https:/
Addressed by: https:/
Add missing tests for nova.db.
Addressed by: https:/
Add missing tests for db.api.
Addressed by: https:/
Add tests for some db.security_group_* methods
Addressed by: https:/
Add missing tests for cell_* methods
Addressed by: https:/
Add tests for `db.console_
Addressed by: https:/
Add missing tests for certificate_* methods
Addressed by: https:/
Add missing tests for s3_image_* methods
Addressed by: https:/
Add missing tests for nova.db.
Addressed by: https:/
Add missing tests for provider_fw_rule_* methods
Addressed by: https:/
Add missing tests for nova.db.
Addressed by: https:/
Add missing tests for db.api.instance_* methods
Addressed by: https:/
Add missing tests for compute_node_* methods
Gerrit topic: https:/
Addressed by: https:/
Add tests for nova.db.
Addressed by: https:/
Refactored tests for db.api
Addressed by: https:/
Refactored tests for instance_fault_*
Addressed by: https:/
Refactored tests for instance_actions_*
Addressed by: https:/
Improved tests for instance_actions_*
Addressed by: https:/
Add missing tests for db.api.instance_* methods
Addressed by: https:/
Add missing tests for console_* methods.
Gerrit topic: https:/
Addressed by: https:/
Remove duplicated key_pair* tests from test_db_api.
Addressed by: https:/
dnsdomain_* tests refactoring in test_db_api
Addressed by: https:/
Move bw_usage_* tests in test_db_api to own test case.
Addressed by: https:/
Move test_security_
Addressed by: https:/
Move *_ec2_* tests in test_db_api to own test case.
Addressed by: https:/
Move test_stringifie
Addressed by: https:/
Move test_migration_
Addressed by: https:/
Improve db_sqlalchemy_api test coverage
Addressed by: https:/
Improve db_sqlalchemy_api test coverage
Work Items
Dependency tree

* Blueprints in grey have been implemented.