本文整理汇总了Python中common.components.BuildPackAssertHelper.assert_start_script_is_correct方法的典型用法代码示例。如果您正苦于以下问题:Python BuildPackAssertHelper.assert_start_script_is_correct方法的具体用法?Python BuildPackAssertHelper.assert_start_script_is_correct怎么用?Python BuildPackAssertHelper.assert_start_script_is_correct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.components.BuildPackAssertHelper
的用法示例。
在下文中一共展示了BuildPackAssertHelper.assert_start_script_is_correct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_with_nginx
# 需要导入模块: from common.components import BuildPackAssertHelper [as 别名]
# 或者: from common.components.BuildPackAssertHelper import assert_start_script_is_correct [as 别名]
def test_with_nginx(self):
# helpers to confirm the environment
bp = BuildPackAssertHelper()
nginx = NginxAssertHelper()
hhvm = HhvmAssertHelper()
self.opts.set_php_vm('hhvm')
self.opts.set_web_server('nginx')
# run the compile step of the build pack
output = ErrorHelper().compile(self.bp)
# confirm downloads
DownloadAssertHelper(2, 2).assert_downloads_from_output(output)
# confirm start script
bp.assert_start_script_is_correct(self.build_dir)
nginx.assert_start_script_is_correct(self.build_dir)
hhvm.assert_start_script_is_correct(self.build_dir)
# confirm bp utils installed
bp.assert_scripts_are_installed(self.build_dir)
bp.assert_config_options(self.build_dir)
# check env & proc files
nginx.assert_contents_of_procs_file(self.build_dir)
hhvm.assert_contents_of_procs_file(self.build_dir)
hhvm.assert_contents_of_env_file(self.build_dir)
# webdir exists
nginx.assert_web_dir_exists(self.build_dir, self.opts.get_webdir())
# check hhvm & nginx installed
nginx.assert_files_installed(self.build_dir)
hhvm.assert_files_installed(self.build_dir)
# check for Nginx socket config
hhvm.assert_server_ini_contains(self.build_dir,
'hhvm.server.file_socket')
hhvm.assert_server_ini_contains(self.build_dir, 'php-fpm.socket')
示例2: test_with_httpd_hhvm_and_newrelic
# 需要导入模块: from common.components import BuildPackAssertHelper [as 别名]
# 或者: from common.components.BuildPackAssertHelper import assert_start_script_is_correct [as 别名]
def test_with_httpd_hhvm_and_newrelic(self):
# helpers to confirm the environment
bp = BuildPackAssertHelper()
nr = NewRelicAssertHelper()
httpd = HttpdAssertHelper()
hhvm = HhvmAssertHelper()
# set web server to httpd, since that's what we're expecting here
self.opts.set_php_vm("hhvm")
self.opts.set_hhvm_download_url("{DOWNLOAD_URL}/hhvm/{HHVM_VERSION}/{HHVM_PACKAGE}")
self.opts.set_web_server("httpd")
# run the compile step of the build pack
output = ErrorHelper().compile(self.bp)
# confirm downloads
DownloadAssertHelper(16, 2).assert_downloads_from_output(output)
# confirm start script
bp.assert_start_script_is_correct(self.build_dir)
httpd.assert_start_script_is_correct(self.build_dir)
hhvm.assert_start_script_is_correct(self.build_dir)
# confirm bp utils installed
bp.assert_scripts_are_installed(self.build_dir)
bp.assert_config_options(self.build_dir)
# check env & proc files
httpd.assert_contents_of_procs_file(self.build_dir)
httpd.assert_contents_of_env_file(self.build_dir)
hhvm.assert_contents_of_procs_file(self.build_dir)
hhvm.assert_contents_of_env_file(self.build_dir)
# webdir exists
httpd.assert_web_dir_exists(self.build_dir, self.opts.get_webdir())
# check php & httpd installed
httpd.assert_files_installed(self.build_dir)
hhvm.assert_files_installed(self.build_dir)
# Test NewRelic should not be installed w/HHVM
nr.is_not_installed(self.build_dir)
示例3: test_with_httpd
# 需要导入模块: from common.components import BuildPackAssertHelper [as 别名]
# 或者: from common.components.BuildPackAssertHelper import assert_start_script_is_correct [as 别名]
def test_with_httpd(self):
# helpers to confirm the environment
bp = BuildPackAssertHelper()
httpd = HttpdAssertHelper()
hhvm = HhvmAssertHelper()
# set web server to httpd, since that's what we're expecting here
self.opts.set_php_vm('hhvm')
self.opts.set_web_server('httpd')
# run the compile step of the build pack
output = ErrorHelper().compile(self.bp)
# confirm downloads
DownloadAssertHelper(16, 2).assert_downloads_from_output(output)
# confirm start script
bp.assert_start_script_is_correct(self.build_dir)
httpd.assert_start_script_is_correct(self.build_dir)
hhvm.assert_start_script_is_correct(self.build_dir)
# confirm bp utils installed
bp.assert_scripts_are_installed(self.build_dir)
bp.assert_config_options(self.build_dir)
# check env & proc files
httpd.assert_contents_of_procs_file(self.build_dir)
httpd.assert_contents_of_env_file(self.build_dir)
hhvm.assert_contents_of_procs_file(self.build_dir)
hhvm.assert_contents_of_env_file(self.build_dir)
# webdir exists
httpd.assert_web_dir_exists(self.build_dir, self.opts.get_webdir())
# check php & httpd installed
httpd.assert_files_installed(self.build_dir)
hhvm.assert_files_installed(self.build_dir)
# check for Apache TCP port
hhvm.assert_server_ini_contains(self.build_dir,
'hhvm.server.port = 9000')