3.3. 手动配置 Integration Test Suite

discover-tempest-config 命令自动生成 tempest.conf 文件。但是,您必须确保 tempest.conf 文件对应于您的环境配置。

3.3.1. 手动配置 Integration Test Suite 扩展列表

默认的 tempest.conf 文件包含每个组件的扩展列表。检查 tempest.conf 文件中每个组件的 api_extensions 属性,并验证扩展列表与您的部署对应。

如果部署中提供的扩展与 tempest.conf 文件的 api_extensions 属性中的扩展列表不匹配,则组件会失败 tempest 测试。要防止此失败,您必须识别部署中存在的扩展,并将它们包含在 api_extensions 参数中。要获取部署中的网络、计算、卷或身份扩展列表,请运行以下命令:

流程

  • 要在部署中检索网络、计算、卷或身份扩展列表,请输入以下命令:

    $ openstack extension list [--network] [--compute] [--volume] [--identity]

3.3.2. 手动配置 heat_plugin

您可以在 tempest.conf 文件中手动配置 heat_plugin

流程

  • 根据您的部署,使用以下示例配置 heat_plugin

    [service_available]
    heat = True
    
    [heat_plugin]
    username = demo
    password = ***
    project_name = demo
    admin_username = admin
    admin_password = ****
    admin_project_name = admin
    auth_url = http://10.0.0.110:5000//v3
    auth_version = 3
    user_domain_id = default
    project_domain_id = default
    user_domain_name = Default
    project_domain_name = Default
    region = regionOne
    fixed_network_name = demo_project_network
    network_for_ssh = public
    floating_network_name = nova
    instance_type = m1.nano
    minimal_instance_type = m1.micro
    image_ref = 7faed41e-a56c-4971-bf48-24e4e23e69a5
    minimal_image_ref = 7faed41e-a56c-4971-bf48-24e4e23e69a5

使用 openstack network list 命令识别 fixed_network_namenetwork_for_sshfloating_network_name 参数的网络。

注意

您必须在 tempest.conf 文件的 [service_available] 部分中将 heat 设置为 True,并且 [heat_plugin] 部分的 username 属性中的用户必须具有角色 member。例如,输入以下命令将 member 角色添加到 demo 用户:

$ openstack role add --user demo --project demo member