当前位置: 首页>>代码示例>>Python>>正文


Python SmContext.get_service_starter方法代码示例

本文整理汇总了Python中servicemanager.smcontext.SmContext.get_service_starter方法的典型用法代码示例。如果您正苦于以下问题:Python SmContext.get_service_starter方法的具体用法?Python SmContext.get_service_starter怎么用?Python SmContext.get_service_starter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在servicemanager.smcontext.SmContext的用法示例。


在下文中一共展示了SmContext.get_service_starter方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_external_binary_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_external_binary_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("FAKE_NEXUS", "foo", proxy=None)
     expected = [ 'python', 'fakenexus.py']
     cmd = starter.get_start_command("BINARY") #context will be ignored
     self.assertEqual(cmd, expected)
开发者ID:liquidarmour,项目名称:service-manager,代码行数:9,代码来源:tests.py

示例2: test_python_binary_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_python_binary_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("PYTHON_SIMPLE_SERVER_ASSETS_FRONTEND", "foo", proxy=None)
     expected = ['python -m SimpleHTTPServer 9032']
     cmd = starter.get_start_command("BINARY")
     self.assertEqual(cmd, expected)
开发者ID:tmikus,项目名称:service-manager,代码行数:9,代码来源:tests.py

示例3: test_python_binary_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_python_binary_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("PYTHON_SIMPLE_SERVER_ASSETS_FRONTEND", "foo", proxy=None)
     expected = [ 'get_start_command() not implemented for this type of service - fork and make a pull request :)' ]
     cmd = starter.get_start_command("BINARY")
     self.assertEqual(cmd, expected)
开发者ID:liquidarmour,项目名称:service-manager,代码行数:9,代码来源:tests.py

示例4: test_play_source_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_play_source_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("PLAY_NEXUS_END_TO_END_TEST", True, False, None, port=None)
     expected = [
         "play",
         "start -Dhttp.port=8500 -Dservice.manager.serviceName=PLAY_NEXUS_END_TO_END_TEST -Dservice.manager.runFrom=True -DFoo=false",
     ]
     self.assertEqual(starter.get_start_command("SOURCE"), expected)
开发者ID:Jagordon,项目名称:service-manager,代码行数:11,代码来源:tests.py

示例5: test_play_binary_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_play_binary_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("PLAY_NEXUS_END_TO_END_TEST", True, False, None, port=None)
     #starter = SmPlayServiceStarter(context, "PLAY_NEXUS_END_TO_END_TEST", True, False, None, None, None, None)
     expected = [ './basicplayapp/bin/basicplayapp',
                             '-DProd.microservice.whitelist.useWhitelist=false',
                             '-DProd.mongodb.uri=mongodb://localhost:27017/auth',
                             '-J-Xmx256m',
                             '-J-Xms256m',
                             '-J-XX:MaxPermSize=128m',
                             '-Dhttp.port=8500',
                             '-Dservice.manager.serviceName=PLAY_NEXUS_END_TO_END_TEST',
                             '-Dservice.manager.runFrom=True']
     self.assertEqual(starter.get_start_command("BINARY"), expected)
开发者ID:liquidarmour,项目名称:service-manager,代码行数:17,代码来源:tests.py

示例6: test_dropwizard_binary_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_dropwizard_binary_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("DROPWIZARD_NEXUS_END_TO_END_TEST", "foo", proxy=None)
     expected = [
         'java',
         '-Dfile.encoding=UTF8',
         '-Xmx64M',
         '-XX:+CMSClassUnloadingEnabled',
         '-XX:MaxPermSize=64m',
         '-Ddw.http.port=8080',
         '-Dservice.manager.serviceName=DROPWIZARD_NEXUS_END_TO_END_TEST',
         '-Dservice.manager.serviceName=DROPWIZARD_NEXUS_END_TO_END_TEST',
         '-Dservice.manager.runFrom=foo',
         '-jar',
         'dwtest-foo-shaded.jar',
         'server',
         'dev_config.yml']
     cmd = starter.get_start_command("BINARY")
     cmd[-1] = cmd[-1].split("/")[-1]
     cmd[0] = cmd[0].split("/")[-1]
     cmd[len(cmd) -3] = cmd[len(cmd) -3].split("/")[-1]
     self.assertEqual(cmd, expected)
开发者ID:liquidarmour,项目名称:service-manager,代码行数:25,代码来源:tests.py

示例7: test_dropwizard_source_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_dropwizard_source_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("DROPWIZARD_NEXUS_END_TO_END_TEST", "foo", proxy=None)
     expected = ['./startappfromcode.sh']
     self.assertEqual(starter.get_start_command("SOURCE"), expected)
开发者ID:liquidarmour,项目名称:service-manager,代码行数:8,代码来源:tests.py

示例8: test_external_source_config

# 需要导入模块: from servicemanager.smcontext import SmContext [as 别名]
# 或者: from servicemanager.smcontext.SmContext import get_service_starter [as 别名]
 def test_external_source_config(self):
     config_dir_override = os.path.join(os.path.dirname(__file__), "conf")
     context = SmContext(SmApplication(config_dir_override), None, False, False)
     starter = context.get_service_starter("FAKE_NEXUS", "foo", proxy=None)
     expected = ["python", "fakenexus.py"]
     self.assertEqual(starter.get_start_command("SOURCE"), expected)  # context will be ignored
开发者ID:Jagordon,项目名称:service-manager,代码行数:8,代码来源:tests.py


注:本文中的servicemanager.smcontext.SmContext.get_service_starter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。