我在Tomcat包之后为我的包"kubernetes-cluster“添加了一些单元测试(参见:https://github.com/openstack/murano-apps/blob/master/Tomcat/package/Classes/TomcatTest.yaml)。
然后,使用命令运行它(不带--config-file、--os-auth-url,在path /etc/murano/中不带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'我只想检查我的单元测试是否像pep8或py27那样用muranoPL编写正确。我可以像tox -e py27一样运行tox -e murano-test-runner而不需要连接keystone服务器和neutron服务器吗?如果不能,原因何在?如果我可以,怎么做?模拟键控客户端和中性客户端?还是其他方式?有人能帮我吗?谢谢。
发布于 2017-03-22 15:21:34
我嘲笑:
keystoneclient.v3.Client(and deal with auth_uri.replace('v2.0', 'v3') AttributeError Exception) murano.engine.system.net_explorer.NetworkExplorer._get_client
则murano-test-runner可以在没有config-opts os-*或config-file的情况下运行
https://stackoverflow.com/questions/42828482
复制相似问题