Tempest test resource cleanup
The cleanup/release of test resources created/allocated in the class level
test fixtures is invoked in the class level tearDown fixure.
However tearDownClass is invoked by the unittest framework only in case
setUpClass is successful. This is causing resources being leaked when:
- a skip exception is raised after resources (typically test accounts)
have already been allocated
- there is a temporary failure in the system under test which causes the
setUpClass to fail
The test-accounts bp introduces the possibility to run parallel tests
using a configured list of pre-provisioned test accounts. Test accounts
are allocated and released by each test class, and a failure to release
leads to exhaustion of test accounts.
Blueprint information
- Status:
- Complete
- Approver:
- Matthew Treinish
- Priority:
- High
- Drafter:
- Andrea Frittoli
- Direction:
- Approved
- Assignee:
- Andrea Frittoli
- Definition:
- Approved
- Series goal:
- Proposed for kilo
- Implementation:
- Implemented
- Milestone target:
- kilo-rc
- Started by
- Andrea Frittoli
- Completed by
- Andrea Frittoli
Related branches
Related bugs
Bug #1375454: AttributeError: type object 'TestChassis' has no attribute 'created_objects' | Invalid |
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
add bp:resource-cleanup
Addressed by: https:/
Framework for resource safe class level fixtures
Addressed by: https:/
Migrate computev2 API tests to resource_* fixtures
Addressed by: https:/
Migrate computev3 API tests to resource_* fixtures
Addressed by: https:/
Migrate identity API tests to resource_* fixtures
Addressed by: https:/
Migrate network API tests to resource_* fixtures
Addressed by: https:/
Migrate baremetal API tests to resource_* fixtures
Addressed by: https:/
Migrate database API tests to resource_* fixtures
Addressed by: https:/
Migrate data_processing API tests to resource_* fixtures
Addressed by: https:/
Migrate image API tests to resource_* fixtures
Addressed by: https:/
Migrate object_storage API tests to resource_* fixtures
Addressed by: https:/
Migrate orchestration API tests to resource_* fixtures
Addressed by: https:/
Migrate queuing API tests to resource_* fixtures
Addressed by: https:/
Migrate telemetry API tests to resource_* fixtures
Addressed by: https:/
Migrate volume API tests to resource_* fixtures
Addressed by: https:/
Migrate scenario API tests to resource_* fixtures
Addressed by: https:/
Migrate thirdparty API tests to resource_* fixtures
Addressed by: https:/
Migrate cli API tests to resource_* fixtures
Addressed by: https:/
Hacking rule to forbid resource unsafe fixtures
Addressed by: https:/
Drop unused safe_setup decorator
Addressed by: https:/
orchestration: check for attributes in resource_cleanup
Addressed by: https:/
Remove setUpClass added after cleanup
Addressed by: https:/
Framework for staged setup
- https:/
Addressed by: https:/
Split resource_setup for volumes tests
Addressed by: https:/
Update compute base test to split up resource_setup
Addressed by: https:/
Reorder setup and cleanup functions for readability
Addressed by: https:/
Split resource_setup for servers tests
Addressed by: https:/
Split resource_setup for security-group tests
Addressed by: https:/
Split resource_setup for limit tests
Addressed by: https:/
Split resource_setup for network tests
Addressed by: https:/
Split resource_setup for volume tests
Addressed by: https:/
Split resource_setup for object_storage tests
Addressed by: https:/
Split resource_setup for data_processing tests
Addressed by: https:/
Split resource_setup for baremetal tests
Addressed by: https:/
Split resource_setup for compute tests
Addressed by: https:/
Split resource_setup for database tests
Addressed by: https:/
Split resource_setup for identity tests
Addressed by: https:/
Split resource_setup for image tests
Addressed by: https:/
Drop the legacy and un-used _interface
Addressed by: https:/
Initial class creds creation in test base class
Addressed by: https:/
Split resource_setup for messaging tests
Addressed by: https:/
Split resource_setup for orchestration tests
Addressed by: https:/
Split resource_setup for telemetry tests
Addressed by: https:/
Split creds and resources in tenant isolation
Addressed by: https:/
Use cls instead of self in classmethod
Addressed by: https:/
Split resource_setup for scenario tests
Addressed by: https:/
Split resource_setup for cli tests
Addressed by: https:/
Split resource_setup for thirdparty tests
Addressed by: https:/
Make scenario tests requiring admin skip if no admin creds
Addressed by: https:/
Remove redundant calls to clear_isolated_
Gerrit topic: https:/
Addressed by: https:/
Extend credentials to support roles
Addressed by: https:/
Remove unused methods
Addressed by: https:/
Extend get_client_manager to support roles
Addressed by: https:/
Move resource-cleanup to implemented
Addressed by: https:/
Introduce creds_provider in test.py
Addressed by: https:/
Move identity_version to class level
Work Items
Work items:
Define base fixtures: DONE
Migrate base classes and tests to use the new framework (multiple patches): DONE
Hacking rule to prevent overriding of setUpClass and tearDownClass: DONE
Split resource_setup in multiple steps in base class: DONE
Migrate resource_setups to multiple steps (multiple patches): DONE