2.6. 重新运行 Tempest 测试
修改 Tempest 配置文件并重新运行 Tempest 测试。
流程
获取相关 pod 的名称和状态:
$ oc get pods | grep -i <pod_name>
将 <
pod_name
> 替换为您在 Tempest 自定义资源配置文件中指定的名称,如tempest-tests
,或者只能使用$ oc get pods
并搜索相关的 pod。注意如果 pod 仍然活跃,您可以等待测试完成,然后继续下一步。
获取 Tempest 自定义资源(CR)的名称:
$ oc get tempest
删除 Tempest CR:
$ oc delete tempest <tempest_cr>
-
将 <
tempest_cr
> 替换为您在上一步中获取的 Tempest CR 的名称。
-
将 <
验证您是否删除了 pod:
$ oc get pods | grep -i <pod_name>
-
将 <
pod_name
> 替换为您在 Tempest 自定义资源配置文件中指定的名称,如tempest-tests
,或者只能使用$ oc get pods
并搜索相关的 pod。
-
将 <
编辑 Tempest 测试配置文件,例如使用
vim
:$ vim <Tempest_config>
-
将
<Tempest_config
> 替换为 Tempest 测试配置文件的名称,如test_v1beta1_tempest.yaml
。
-
将
对 Tempest 测试配置文件进行所需的编辑,例如您可以修改
excludeList:
参数:excludeList: | # <-- Use | to preserve \n <excludeList_value>
-
使用您要测试的
excludeList
值替换<excludeList_value>
,如tempest.api.identity.v3 Remediation
。
-
使用您要测试的
- 保存并关闭 Tempest 测试配置文件。
为 Tempest 测试创建 pod:
$ oc apply -f <Tempest_config>
-
将
<Tempest_config
> 替换为 Tempest 测试配置文件的名称,如test_v1beta1_tempest.yaml
。
-
将
验证
获取您在上一步中创建的 pod 的名称:
$ oc get pods | grep -i <pod_name>
-
将 <
pod_name
> 替换为您在 Tempest 自定义资源配置文件中指定的名称,如tempest-tests
,或者只能使用$ oc get pods
并搜索相关的 pod。 在日志中检查预期的更改:
$ oc logs <pod_name> | grep <excludeList_value> --context=4
-
将 <
pod_name
> 替换为<excludeList_value>
您在上一步中获取的相关 pod 的名称,并使用添加到 Tempest 测试配置文件中的excludeList
值替换,如tempest.api.identity.v3 aws
。