我爲我的軟件包「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-runner
像tox -e py27
而不連接到keystone服務器和neutron服務器嗎?如果不能,爲什麼?如果可以的話,怎麼樣?模擬keystoneclient和neutronclient?或其他方式? 有人可以幫助我嗎?謝謝。