diff options
Diffstat (limited to 'spec/support/helpers/gitaly_setup.rb')
-rw-r--r-- | spec/support/helpers/gitaly_setup.rb | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/spec/support/helpers/gitaly_setup.rb b/spec/support/helpers/gitaly_setup.rb index 398a2a20f2f..7db9e0aaf09 100644 --- a/spec/support/helpers/gitaly_setup.rb +++ b/spec/support/helpers/gitaly_setup.rb @@ -10,7 +10,6 @@ require 'securerandom' require 'socket' require 'logger' require 'fileutils' -require 'bundler' require_relative '../../../lib/gitlab/utils' @@ -50,51 +49,18 @@ module GitalySetup expand_path('.gitlab_shell_secret') end - def gemfile - File.join(tmp_tests_gitaly_dir, 'ruby', 'Gemfile') - end - - def gemfile_dir - File.dirname(gemfile) - end - def gitlab_shell_secret_file File.join(tmp_tests_gitlab_shell_dir, '.gitlab_shell_secret') end def env { - 'GEM_PATH' => Gem.path.join(':'), - 'BUNDLER_SETUP' => nil, - 'BUNDLE_INSTALL_FLAGS' => nil, - 'BUNDLE_IGNORE_CONFIG' => '1', - 'BUNDLE_PATH' => bundle_path, - 'BUNDLE_GEMFILE' => gemfile, - 'BUNDLE_JOBS' => '4', - 'BUNDLE_RETRY' => '3', - 'RUBYOPT' => nil, - # Git hooks can't run during tests as the internal API is not running. 'GITALY_TESTING_NO_GIT_HOOKS' => "1", 'GITALY_TESTING_ENABLE_ALL_FEATURE_FLAGS' => "true" } end - def bundle_path - # Allow the user to override BUNDLE_PATH if they need to - return ENV['GITALY_TEST_BUNDLE_PATH'] if ENV['GITALY_TEST_BUNDLE_PATH'] - - if ENV['CI'] - expand_path('vendor/gitaly-ruby') - else - explicit_path = Bundler.configured_bundle_path.explicit_path - - return unless explicit_path - - expand_path(explicit_path) - end - end - def config_path(service) case service when :gitaly @@ -125,10 +91,6 @@ module GitalySetup system(env, *cmd, exception: true, chdir: tmp_tests_gitaly_dir) end - def install_gitaly_gems - run_command(%W[make #{tmp_tests_gitaly_dir}/.ruby-bundle], env: env) - end - def build_gitaly run_command(%w[make all WITH_BUNDLED_GIT=YesPlease], env: env.merge('GIT_VERSION' => nil)) end @@ -188,20 +150,6 @@ module GitalySetup end end - def check_gitaly_config! - LOGGER.debug "Checking gitaly-ruby Gemfile...\n" - - unless File.exist?(gemfile) - message = "#{gemfile} does not exist." - message += "\n\nThis might have happened if the CI artifacts for this build were destroyed." if ENV['CI'] - abort message - end - - LOGGER.debug "Checking gitaly-ruby bundle...\n" - out = ENV['CI'] ? $stdout : '/dev/null' - abort 'bundle check failed' unless system(env, 'bundle', 'check', out: out, chdir: gemfile_dir) - end - def connect_proc(toml) # This code needs to work in an environment where we cannot use bundler, # so we cannot easily use the toml-rb gem. This ad-hoc parser should be @@ -343,8 +291,6 @@ module GitalySetup end def spawn_gitaly(toml = nil) - check_gitaly_config! - pids = [] if toml |