예제 #1
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d', 'bp_env_vars.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(
         build_dir, '.profile.d', 'bp_env_vars.sh').any_line().equals(
             'export [email protected]\n'))
예제 #2
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, 'start.sh').line(0).equals(
         'export PYTHONPATH=$HOME/.bp/lib\n')  # noqa
      .line(-1).equals('$HOME/.bp/bin/start'))
예제 #3
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d/finalize_rewrite.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(
         build_dir, '.profile.d/finalize_rewrite.sh').line(0).contains(
             'export PYTHONPATH=$HOME/.bp/lib'))  # noqa
예제 #4
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.procs').any_line().equals(
         'nginx: $HOME/nginx/sbin/nginx -c '  # noqa
         '"$HOME/nginx/conf/nginx.conf"\n'))
예제 #5
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d/finalize_rewrite.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(
         build_dir, '.profile.d/finalize_rewrite.sh').any_line().contains(
             '$HOME/.bp/bin/rewrite "$HOME/httpd/conf"'))
예제 #6
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.env').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.env').any_line().equals(
         'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'
         '$HOME/hhvm/usr/lib/hhvm\n').equals(
             'export PATH=$PATH:$HOME/hhvm/usr/bin\n'))
예제 #7
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'start.sh')
         .any_line()
         .equals('$HOME/.bp/bin/rewrite "$HOME/nginx/conf"\n'))
예제 #8
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .line(0)
         .equals('php-app: $HOME/php/bin/php -c "$HOME/php/etc" app.php\n'))
예제 #9
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d/rewrite.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.profile.d/rewrite.sh')
         .line(0)
             .contains('export PYTHONPATH=$HOME/.bp/lib'))  # noqa
예제 #10
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d', 'bp_env_vars.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.profile.d', 'bp_env_vars.sh')
         .any_line()
         .equals('export [email protected]\n'))
예제 #11
0
 def assert_downloads_from_output(self, output):
     assert output is not None, "Output is None"
     tfah = TextFileAssertHelper()
     (tfah.expect().on_string(output).line_count_equals(
         self.download,
         lambda l: l.startswith('Downloaded')).line_count_equals(
             self.install, lambda l: l.startswith('Installing')).line(
                 -1).startswith('Finished:'))
예제 #12
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, 'start.sh').any_line().equals(
         '$HOME/.bp/bin/rewrite "$HOME/hhvm/etc"\n').equals(
             'hhvm() { $HOME/hhvm/usr/bin/hhvm '
             '-c "$HOME/hhvm/etc/php.ini" "$@"; }\n'))
예제 #13
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .line(0)
         .equals('php-app: $HOME/php/bin/php -c "$HOME/php/etc" app.php\n'))
예제 #14
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.procs').any_line().equals(
         'httpd: $HOME/httpd/bin/apachectl -f '  # noqa
         '"$HOME/httpd/conf/httpd.conf" -k start '
         '-DFOREGROUND\n'))
예제 #15
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.procs').any_line().equals(
         'hhvm: $HOME/hhvm/usr/bin/hhvm --mode server '  # noqa
         '-c $HOME/hhvm/etc/server.ini '
         '-c $HOME/hhvm/etc/php.ini\n'))
예제 #16
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d/rewrite.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.profile.d/rewrite.sh')
         .any_line()
         .contains('$HOME/.bp/bin/rewrite "$HOME/php/etc"'))
예제 #17
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.procs').any_line().equals(
         'php-fpm: $HOME/php/sbin/php-fpm -p '  # noqa
         '"$HOME/php/etc" -y "$HOME/php/etc/php-fpm.conf"'
         ' -c "$HOME/php/etc"\n'))
예제 #18
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .any_line()
             .equals('nginx: $HOME/nginx/sbin/nginx -c '  # noqa
                     '"$HOME/nginx/conf/nginx.conf"\n'))
예제 #19
0
 def assert_downloads_from_output(self, output):
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_string(output)
         .line_count_equals(6, lambda l: l.startswith('Downloaded'))
         .line_count_equals(1, lambda l: l.startswith('No Web'))
         .line_count_equals(1, lambda l: l.startswith('Installing PHP'))
         .line_count_equals(1, lambda l: l.find('php-cli') >= 0)
         .line(-1).startswith('Finished:'))
예제 #20
0
 def assert_downloads_from_output(self, output):
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_string(output)
         .line_count_equals(6, lambda l: l.startswith('Downloaded'))
         .line_count_equals(1, lambda l: l.startswith('No Web'))
         .line_count_equals(1, lambda l: l.startswith('Installing PHP'))
         .line_count_equals(1, lambda l: l.find('php-cli') >= 0)
         .line(-1).startswith('Finished:'))
예제 #21
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .any_line()
             .equals('httpd: $HOME/httpd/bin/apachectl -f '  # noqa
                     '"$HOME/httpd/conf/httpd.conf" -k start '
                     '-DFOREGROUND\n'))
예제 #22
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .any_line()
             .equals('php-fpm: $HOME/php/sbin/php-fpm -p '  # noqa
                     '"$HOME/php/etc" -y "$HOME/php/etc/php-fpm.conf"'
                     ' -c "$HOME/php/etc"\n'))
예제 #23
0
 def assert_downloads_from_output(self, output):
     assert output is not None, "Output is None"
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_string(output)
         .line_count_equals(self.download,
                            lambda l: l.startswith('Downloaded'))
         .line_count_equals(self.install,
                            lambda l: l.startswith('Installing'))
         .line(-1).startswith('Finished:'))
예제 #24
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.env').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, '.env').any_line().equals(
         'export '
         'PATH=$PATH:$HOME/php/bin:$HOME/php/sbin\n')  # noqa
      .equals('export '
              'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/php/lib\n').equals(
                  'export PHPRC=$HOME/php/etc\n'))
예제 #25
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'start.sh')
         .line(0)
             .equals('export PYTHONPATH=$HOME/.bp/lib\n')  # noqa
         .line(-1)
             .equals('$HOME/.bp/bin/start'))
예제 #26
0
 def assert_contents_of_procs_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.procs').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.procs')
         .any_line()
             .equals('hhvm: $HOME/hhvm/usr/bin/hhvm --mode server '  # noqa
                     '-c $HOME/hhvm/etc/server.ini '
                     '-c $HOME/hhvm/etc/php.ini\n'))
예제 #27
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'start.sh')
         .any_line()
         .equals('$HOME/.bp/bin/rewrite "$HOME/hhvm/etc"\n')
         .equals('hhvm() { $HOME/hhvm/usr/bin/hhvm '
                 '-c "$HOME/hhvm/etc/php.ini" "$@"; }\n'))
예제 #28
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d', 'bp_env_vars.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.profile.d', 'bp_env_vars.sh')
         .any_line()
         .equals('export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'
                 '$HOME/hhvm/usr/lib/hhvm\n')
         .equals('export PATH=$PATH:$HOME/hhvm/usr/bin\n'))
예제 #29
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect().root(build_dir, 'newrelic')  # noqa
      .path('daemon',
            'newrelic-daemon.x64').path('agent', 'x64',
                                        'newrelic-20170718.so').exists())
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, 'php', 'etc', 'php.ini').any_line(
     ).startswith('extension=@{HOME}/newrelic/agent/x64/newrelic').equals(
         '[newrelic]\n').equals('newrelic.license=@{NEWRELIC_LICENSE}\n').
      equals('newrelic.appname=app-name-1\n'))
예제 #30
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect().root(build_dir, 'nginx').path('logs')  # noqa
      .path('sbin', 'nginx').root(
          build_dir, 'nginx', 'conf').directory_count_equals(10).path(
              'fastcgi_params').path('http-logging.conf').path(
                  'http-defaults.conf').path('http-php.conf').exists())
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, 'nginx', 'conf',
                            'http-php.conf').any_line().does_not_contain(
                                '#{PHP_FPM_LISTEN}')  # noqa
      .does_not_contain('{TMPDIR}'))
예제 #31
0
 def assert_contents_of_env_file(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, '.profile.d', 'bp_env_vars.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, '.profile.d', 'bp_env_vars.sh')
         .any_line()
             .equals('export '
                     'PATH=$PATH:$HOME/php/bin:$HOME/php/sbin\n')  # noqa
             .equals('export '
                     'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/php/lib\n')
             .equals('export PHPRC=$HOME/php/etc\n'))
예제 #32
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect()
         .root(build_dir, 'appdynamics')  # noqa
             .path('daemon', 'appdynamics-daemon.x64')
             .path('agent', 'x64', 'appdynamics-20121212.so')
         .exists())
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'php', 'etc', 'php.ini')
         .any_line()
         .equals(
             'extension=@{HOME}/appdynamics/agent/x64/appdynamics-20121212.so\n')
         .equals('[appdynamics]\n')
         .equals('appdynamics.license=JUNK_LICENSE\n')
         .equals('appdynamics.appname=app-name-1\n'))
예제 #33
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect()
         .root(build_dir, 'newrelic')  # noqa
             .path('daemon', 'newrelic-daemon.x64')
             .path('agent', 'x64', 'newrelic-20100525.so')
         .exists())
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'php', 'etc', 'php.ini')
         .any_line()
         .equals(
             'extension=@{HOME}/newrelic/agent/x64/newrelic-20100525.so\n')
         .equals('[newrelic]\n')
         .equals('newrelic.license=JUNK_LICENSE\n')
         .equals('newrelic.appname=app-name-1\n'))
예제 #34
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect().root(build_dir, 'codizy', 'client',
                        'application').path('setup.php')  # noqa
      .path('class', 'Codizy_utils.php').root(
          build_dir,
          'php',
          'lib',
          'php',
          'extensions',
          'no-debug-non-zts-20100525',
          reset=True).path('xhprof.so').path('ioncube.so').path(
              'codizy.so').path('curl.so').path('gettext.so').path(
                  'mbstring.so').path('openssl.so').exists())
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(
         build_dir, 'php', 'etc', 'php.ini').any_line().equals(
             'auto_prepend_file = '
             '@{HOME}/codizy/client/application/setup.php\n'))
예제 #35
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect()
         .root(build_dir, 'nginx')
             .path('logs')  # noqa
             .path('sbin', 'nginx')
         .root(build_dir, 'nginx', 'conf')
             .directory_count_equals(10)
             .path('fastcgi_params')
             .path('http-logging.conf')
             .path('http-defaults.conf')
             .path('http-php.conf')
         .exists())
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'nginx', 'conf', 'http-php.conf')
         .any_line()
             .does_not_contain('#{PHP_FPM_LISTEN}')  # noqa
             .does_not_contain('{TMPDIR}'))
예제 #36
0
 def assert_files_installed(self, build_dir):
     fah = FileAssertHelper()
     (fah.expect()
         .root(build_dir, 'codizy', 'client', 'application')
             .path('setup.php')  # noqa
             .path('class', 'Codizy_utils.php')
         .root(build_dir, 'php', 'lib', 'php', 'extensions',
               'no-debug-non-zts-20100525', reset=True)
             .path('xhprof.so')
             .path('ioncube.so')
             .path('codizy.so')
             .path('curl.so')
             .path('gettext.so')
             .path('mbstring.so')
             .path('openssl.so')
         .exists())
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'php', 'etc', 'php.ini')
         .any_line()
         .equals('auto_prepend_file = '
                 '@{HOME}/codizy/client/application/setup.php\n'))
예제 #37
0
 def assert_start_script_is_correct(self, build_dir):
     fah = FileAssertHelper()
     fah.expect().path(build_dir, 'start.sh').exists()
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(build_dir, 'start.sh').any_line().equals(
         '$HOME/.bp/bin/rewrite "$HOME/httpd/conf"\n'))
예제 #38
0
 def assert_server_ini_contains(self, build_dir, expected_listener):
     tfah = TextFileAssertHelper()
     (tfah.expect()
         .on_file(build_dir, 'hhvm', 'etc', 'server.ini')
         .any_line()
         .contains(expected_listener))
예제 #39
0
 def assert_server_ini_contains(self, build_dir, expected_listener):
     tfah = TextFileAssertHelper()
     (tfah.expect().on_file(
         build_dir, 'hhvm', 'etc',
         'server.ini').any_line().contains(expected_listener))