d528d6d429
Added test case for quota sync which creates a VM in one region, calls quota sync, wait for quota sync to finish, calculated new limits manually and assert these limits with updated nova limits. Added test case to test quota exceeded scenario. Sets quota limit to some small value, call quota sync, try to create more than quota limit VMs. Then assert for Quota exceeded exception for the second VM. Delete all the created resources such as Project, User, VMs, Flavor, Subnet and Network in resouce clean. This should wind up our quota sync for nova resources. Change-Id: Ib5e1a5873219c702d27ac07de81477aafb45d923 |
||
---|---|---|
.. | ||
tests | ||
__init__.py | ||
plugin.py | ||
README.rst |
Tempest Integration of Kingbird |
This directory contains Tempest tests to cover the kingbird project.
Before running Tempest test cases, Do the following
- Clone tempest code from git::
-
$ git clone https://github.com/openstack/tempest.git
- Make below changes in tempest/config.py
Add kingbird configurations to config file:
kingbird_group = cfg.OptGroup(name='kingbird', title="Options for kingbird configurations") KingbirdGroup = [ cfg.StrOpt('endpoint_type', default='publicURL', help="Endpoint type of Kingbird service."), cfg.IntOpt('TIME_TO_SYNC', default=30), help="Maximum time to wait for a sync call to complete."), cfg.StrOpt('endpoint_url', help="Endpoint URL of Kingbird service."), cfg.StrOpt('api_version', default='v1.0', help="Api version of Kingbird service.") ]
Add kingbird service to ServiceAvailableGroup as below:: cfg.BoolOpt('kingbird', default=False, help="Whether or not kingbird is expected to be available"),
Add kingbird_group and KingbirdGroup to list of opts(_opts)
- Generate config file::
-
$ tox -e genconfig
It generates etc/tempest.conf.sample. Copy it to /etc/tempest/ and rename as tempest.conf
Make sure the default values represented by DEFAULT_QUOTAS in tempest/api/kingbird/base.py has to be same as kingbird_global_limit section in kingbird.conf.
Copy tempest testcases for Kingbird:
$ cp -r tempest/tests/api/kingbird <tempest root directory>/tempest/api/ $ cp tempest/tests/common/kingbird.py <tempest root directory>/tempest/common/
Set kingbird = True under [service_available] section in tempest.conf:
To list all Kingbird tempest cases, go to tempest directory, then run:
$ testr list-tests kingbird
- To run kingbird tempest with nosetests, go to tempest directory, then run::
-
$ nosetests -sv tempest/api/kingbird/test_kingbird_api.py
To run kingbird tempest plugin tests using tox, go to tempest directory, then run:
$ tox -eall-plugin kingbird
To run a specific test:
$ tox -eall-plugin tempest.api.kingbird.test_kingbird_api.KingbirdTestJSON.test_kingbird_delete_all_method
To run tempest with run_test, go to tempest directory, then run:
$ ./run_tempest.sh -N -- kingbird
To run a single test case, go to tempest directory, then run with test case name, e.g.:
$ ./run_tempest.sh -N -- tempest.api.kingbird.test_kingbird_api.KingbirdTestJSON.test_kingbird_delete_all_method