Python 为什么tempest可以在单个测试中成功,但在批测试中失败

Python 为什么tempest可以在单个测试中成功,但在批测试中失败,python,openstack,python-unittest,unittest2,Python,Openstack,Python Unittest,Unittest2,我使用tempest来测试我的openstack云,我可以成功运行单个测试,例如 testr run -- tempest.cli.simple_read_only.test_cinder.SimpleReadOnlyCinderClientTest.test_cinder_availability_zone_list 并在以下命令中获得成功 nova availability-zone-list 但是当我批量运行时,例如 testr run --parallel 失败,信息如下: FAI

我使用tempest来测试我的openstack云,我可以成功运行单个测试,例如

testr run -- tempest.cli.simple_read_only.test_cinder.SimpleReadOnlyCinderClientTest.test_cinder_availability_zone_list
并在以下命令中获得成功

nova availability-zone-list
但是当我批量运行时,例如

testr run --parallel
失败,信息如下:

FAIL: tempest.cli.simple_read_only.test_cinder.SimpleReadOnlyCinderClientTest.test_cinder_availability_zone_list
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout
Traceback (most recent call last):
  File "/root/tempest.bak/tempest/cli/simple_read_only/test_cinder.py", line 107, in test_cinder_availability_zone_list
    self.cinder('availability-zone-list')    
  File "/root/tempest.bak/tempest/cli/__init__.py", line 84, in cinder
    'cinder', action, flags, params, admin, fail_ok)    
  File "/root/tempest.bak/tempest/cli/__init__.py", line 109, in cmd_with_auth
    return self.cmd(cmd, action, flags, params, fail_ok)    
  File "/root/tempest.bak/tempest/cli/__init__.py", line 129, in cmd
    stderr=result_err)    

CommandFailed: Command '['/usr/local/bin/cinder', '--os-username', 'xxx', '--os-tenant-name', 'xxx', '--os-password', 'xxx', '--os-auth-url', 'http://xxxx:5000/v2.0', '--endpoint-type', 'publicURL', 'availability-zone-list']' returned non-zero exit status 1
其他命令,如:传输列表,也都失败了


有人能解释为什么会这样吗?我确信租户名称、密码是正确的。因为单个测试可以通过。

看起来您的计算机上的cinder命令失败了。您是否尝试过从终端手动获取有问题的命令字符串并运行它?非常感谢!是的,我键入了命令cinder availability zone list,但失败了。我认为PASSEDid=44是理所当然的成功,因此单个测试也失败了。