Merge branch 'gitaly-test-home' into 'master'

Set an artificial $HOME for gitaly in test

See merge request gitlab-org/gitlab-ce!15614
This commit is contained in:
Rémy Coutable 2017-11-30 12:58:52 +00:00
commit 4be8b9d102
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,8 @@
#!/usr/bin/env ruby
gitaly_dir = 'tmp/tests/gitaly'
env = { 'HOME' => File.expand_path('tmp/tests') }
args = %W[#{gitaly_dir}/gitaly #{gitaly_dir}/config.toml]
# Print the PID of the spawned process
puts spawn(*args, [:out, :err] => 'log/gitaly-test.log')
puts spawn(env, *args, [:out, :err] => 'log/gitaly-test.log')

View file

@ -207,3 +207,6 @@ Shoulda::Matchers.configure do |config|
with.library :rails
end
end
# Prevent Rugged from picking up local developer gitconfig.
Rugged::Settings['search_path_global'] = Rails.root.join('tmp/tests').to_s