本文整理汇总了Python中CustomServiceOrchestrator.CustomServiceOrchestrator.resolve_script_path方法的典型用法代码示例。如果您正苦于以下问题:Python CustomServiceOrchestrator.resolve_script_path方法的具体用法?Python CustomServiceOrchestrator.resolve_script_path怎么用?Python CustomServiceOrchestrator.resolve_script_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomServiceOrchestrator.CustomServiceOrchestrator
的用法示例。
在下文中一共展示了CustomServiceOrchestrator.resolve_script_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_resolve_script_path
# 需要导入模块: from CustomServiceOrchestrator import CustomServiceOrchestrator [as 别名]
# 或者: from CustomServiceOrchestrator.CustomServiceOrchestrator import resolve_script_path [as 别名]
def test_resolve_script_path(self, FileCache_mock, exists_mock):
FileCache_mock.return_value = None
dummy_controller = MagicMock()
config = AmbariConfig().getConfig()
orchestrator = CustomServiceOrchestrator(config, dummy_controller)
# Testing existing path
exists_mock.return_value = True
path = orchestrator.\
resolve_script_path("/HBASE/package", "scripts/hbase_master.py", "PYTHON")
self.assertEqual("/HBASE/package/scripts/hbase_master.py", path)
# Testing not existing path
exists_mock.return_value = False
try:
orchestrator.resolve_script_path("/HBASE",
"scripts/hbase_master.py", "PYTHON")
self.fail('ExpectedException not thrown')
except AgentException:
pass # Expected