Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unit testing 为什么murano测试运行程序连接到keystone?_Unit Testing_Openstack - Fatal编程技术网

Unit testing 为什么murano测试运行程序连接到keystone?

Unit testing 为什么murano测试运行程序连接到keystone?,unit-testing,openstack,Unit Testing,Openstack,我在Tomcat包之后为我的包“kubernetes集群”添加了一些单元测试(请参阅:) 然后,使用命令运行它(不带--config文件,-os auth url,不带路径/etc/murano/中的murano.conf): 我收到了错误消息: 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

我在Tomcat包之后为我的包“kubernetes集群”添加了一些单元测试(请参阅:)

然后,使用命令运行它(不带--config文件,-os auth url,不带路径/etc/murano/中的murano.conf):

我收到了错误消息:

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'
我只想检查我的单元测试是否正确使用Muranop编写,比如pep8或py27。 在不连接keystone服务器和Neutrono服务器的情况下,我是否可以像运行
tox-e murano测试运行程序那样运行
tox-e py27
?如果不能,原因为何?如果可以,怎么做?模拟密钥客户端和中性客户端?还是其他方式? 有人能帮我吗?谢谢。

我嘲笑:

keystoneclient.v3.Client(并处理auth_uri.replace('v2.0','v3')AttributeError异常)
murano.engine.system.net\u explorer.NetworkExplorer.\u get\u client

然后,murano测试运行程序可以在没有配置选项os-*或配置文件的情况下运行

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'