Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Configuring the OpenStack Integration Test Suite
4.1. Creating a Workspace Copier lienLien copié sur presse-papiers!
Source the credentials for the target deployment:
If the target is in the undercloud, source the credentials for the undercloud:
source stackrc
# source stackrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the target is in the overcloud, source the credentials for the overcloud:
source overcloudrc
# source overcloudrcCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Initialize
tempest:tempest init mytempest cd mytempest
# tempest init mytempest # cd mytempestCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command creates a tempest workspace named
mytempest.Run the following command to view a list of existing workspaces:
tempest workspace list
# tempest workspace listCopy to Clipboard Copied! Toggle word wrap Toggle overflow Generate the
etc/tempest.conffile:discover-tempest-config --deployer-input ~/tempest-deployer-input.conf \ --debug --create --network-id <UUID>
# discover-tempest-config --deployer-input ~/tempest-deployer-input.conf \ --debug --create --network-id <UUID>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
UUIDwith the UUID of the external network.discover-tempest-configwas formerly calledconfig_tempest.pyand takes the same parameters. It is provided bypython-tempestconfwhich is installed as a dependency ofopenstack-tempest.
To generate the etc/tempest.conf file for the undercloud, ensure that the region name in the tempest-deployer-input.conf file is the same as the name in the undercloud deployment. If these names do not match, update the region name in the tempest-deployer-input.conf file to match the region name of your undercloud.
To inspect the region name of your undercloud, run the following commands:
source stackrc openstack region list
$ source stackrc
$ openstack region list
To inspect the region name of your overcloud, run the following commands:
source overcloudrc openstack region list
$ source overcloudrc
$ openstack region list
4.2. Configuring Tempest Manually Copier lienLien copié sur presse-papiers!
The discover-tempest-config command generates the tempest.conf file automatically. However, you must ensure that the tempest.conf file corresponds to the configuration of your environment.
4.2.1. Configuring Tempest Extension Lists Manually Copier lienLien copié sur presse-papiers!
The default tempest.conf file contains lists of extensions for each component. Inspect the api_extensions attribute for each component in the tempest.conf file and verify that the lists of extensions correspond to your deployment.
If the extensions that are available in your deployment do not correspond to the list of extensions in the api_extensions attribute of the tempest.conf file, the component fails tempest tests. To prevent this failure, you must identify the extensions that are available in your deployment and include them in the api_extensions parameter. To get a list of Network, Compute, Volume, or Identity extensions in your deployment, run the following command:
openstack extension list [--network] [--compute] [--volume] [--identity]
$ openstack extension list [--network] [--compute] [--volume] [--identity]
4.2.2. Configuring heat_plugin Manually Copier lienLien copié sur presse-papiers!
Configure heat_plugin plugin manually according to your deployment configuration. The following example contains the minimum tempest.conf configuration for heat_plugin:
You must set heat_plugin to True in the [service_available] section of the tempest.conf file, and the user in the username attribute of the [heat_plugin] section must have the role member. For example, run the following command to add the member role to the demo user:
openstack role add --user demo --project demo member
$ openstack role add --user demo --project demo member
4.3. Verifying Your Tempest Configuration Copier lienLien copié sur presse-papiers!
Verify your current tempest configuration:
tempest verify-config -o <output>
# tempest verify-config -o <output>
output is the output file where Tempest writes your updated configuration. This is different from your original configuration file.
4.4. Changing the Logging Configuration Copier lienLien copié sur presse-papiers!
The default location for log files is the logs directory within your tempest workspace.
To change this directory, in tempest.conf, under the [DEFAULT] section, set log_dir to the desired directory:
[DEFAULT] log_dir = <directory>
[DEFAULT]
log_dir = <directory>
If you have your own logging configuration file, in tempest.conf, under the [DEFAULT] section, set log_config_append to your file:
[DEFAULT] log_config_append = <file>
[DEFAULT]
log_config_append = <file>
If you set the log_config_append attribute, Tempest ignores all other logging configuration in tempest.conf, including the log_dir attribute.
4.5. Configuring Microversion Tests Copier lienLien copié sur presse-papiers!
The OpenStack Integration Test Suite provides stable interfaces to test the API microversions. This section contains information about implementing microversion tests using these interfaces.
First, you must configure options in the tempest.conf configuration file to specify the target microversions. Configure these options to ensure that the supported microversions correspond to the microversions used in the OpenStack cloud. You can specify a range of target microversions to run multiple microversion tests in a single Integration Test Suite operation.
For example, to limit the range of microversions for the compute service, in the [compute] section of your configuration file, assign values to the min_microversion and max_microversion parameters:
[compute] min_microversion = 2.14 max_microversion = latest
[compute]
min_microversion = 2.14
max_microversion = latest