Esempio n. 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'))
Esempio 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'))
Esempio n. 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
Esempio n. 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'))
Esempio 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"'))
Esempio n. 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'))
 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'))
Esempio 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'))
Esempio 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
Esempio n. 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'))
Esempio 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:'))
Esempio n. 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'))
Esempio 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'))
Esempio 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'))
Esempio 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'))
Esempio 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"'))
Esempio n. 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'))
Esempio 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'))
Esempio 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:'))
Esempio n. 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:'))
Esempio n. 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'))
Esempio 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'))
Esempio 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:'))
Esempio n. 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'))
Esempio 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'))
Esempio n. 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'))
Esempio 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'))
Esempio 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'))
Esempio 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'))
Esempio 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}'))
Esempio n. 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'))
Esempio 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'))
Esempio 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'))
Esempio 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'))
Esempio 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}'))
Esempio n. 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'))
Esempio 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'))
Esempio 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))
Esempio n. 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))