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


Python components.BuildPackAssertHelper类代码示例

本文整理汇总了Python中common.components.BuildPackAssertHelper的典型用法代码示例。如果您正苦于以下问题:Python BuildPackAssertHelper类的具体用法?Python BuildPackAssertHelper怎么用?Python BuildPackAssertHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: test_with_nginx

 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')
开发者ID:BHARATMAHESH,项目名称:php-buildpack,代码行数:31,代码来源:test_compile.py

示例2: test_with_httpd_hhvm_and_newrelic

 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)
开发者ID:KKraljic,项目名称:buildpack-php-lucid64,代码行数:33,代码来源:test_newrelic.py

示例3: test_with_httpd

 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')
开发者ID:BHARATMAHESH,项目名称:php-buildpack,代码行数:32,代码来源:test_compile.py


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