2017-03-16 49 views
0

我为我的软件包“kubernetes-cluster”添加一些单元测试,遵循Tomcat包(请参阅:https://github.com/openstack/murano-apps/blob/master/Tomcat/package/Classes/TomcatTest.yaml)。为什么murano-test-runner与keystone连接?

,然后用命令来运行它(无--config文件, - OS-AUTH-URL,没有路径的/ etc /穆拉诺/ murano.conf):

murano-test-runner -v io.murano.apps.docker.kubernetes.KuryrCluster io.murano.test.KuryrClusterTest -l /my-packages and core-library/local/path 

我得到了错误消息:

2017-03-16 07:39:49.978 | 2017-03-16 07:42:50.773 1697 ERROR murano.cmd.test_runner [-] Command failed: 'NoneType' object has no attribute 'replace' 
2017-03-16 07:39:49.978 | Traceback (most recent call last): 
2017-03-16 07:39:49.978 | File "/home/jenkins/workspace/murano-programming-language-unit-test/.tox/murano-test-runner/lib/python2.7/site-packages/murano/cmd/test_runner.py", line 374, in main 
2017-03-16 07:39:49.978 |  exit_code = test_runner.run_tests() 
2017-03-16 07:39:49.978 | File "/home/jenkins/workspace/murano-programming-language-unit-test/.tox/murano-test-runner/lib/python2.7/site-packages/murano/cmd/test_runner.py", line 213, in run_tests 
2017-03-16 07:39:49.978 |  ks_opts = self._validate_keystone_opts(self.args) 
2017-03-16 07:39:49.978 | File "/home/jenkins/workspace/murano-programming-language-unit-test/.tox/murano-test-runner/lib/python2.7/site-packages/murano/cmd/test_runner.py", line 195, in _validate_keystone_opts 
2017-03-16 07:39:49.979 |  ks_opts[param] = ks_opts[param].replace('v2.0', 'v3') 
2017-03-16 07:39:49.979 | AttributeError: 'NoneType' object has no attribute 'replace' 
2017-03-16 07:39:49.979 | 
2017-03-16 07:39:49.979 | Command failed: 'NoneType' object has no attribute 'replace' 

我只想检查我的单元测试写在muranoPL权利或不,像pep8或py27。 我可以运行tox -e murano-test-runnertox -e py27而不连接到keystone服务器和neutron服务器吗?如果不能,为什么?如果可以的话,怎么样?模拟keystoneclient和neutronclient?或其他方式? 有人可以帮助我吗?谢谢。

回答

0

我嘲笑:

keystoneclient.v3.Client(and deal with auth_uri.replace('v2.0', 'v3') AttributeError Exception) murano.engine.system.net_explorer.NetworkExplorer._get_client

然后穆拉诺测试亚军可以在不运行配置,选择采用OS-*或配置文件中