为什么 murano-test-runner 连接到 keystone?

why murano-test-runner connecte to keystone?

我为我的包添加了一些单元测试 "kubernetes-cluster" 按照 Tomcat 包(参见:https://github.com/openstack/murano-apps/blob/master/Tomcat/package/Classes/TomcatTest.yaml)。

然后,运行 使用命令(没有 --config-file,--os-auth-url,路径中没有 murano.conf /etc/murano/):

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-runner 喜欢 tox -e py27 而不连接到 keystone 服务器和 neutron 服务器吗?如果不能,为什么?如果可以,怎么做?模拟 keystoneclient 和 neutronclient?或其他方式? 有人可以帮助我吗?谢谢。

我嘲笑:

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

然后 murano-test-运行ner 可以 运行 没有 config-opts os-* 或 config-file