Commit a14bd24a authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab) Committed by Rémy Coutable

Set an artificial $HOME for gitaly in test

parent feece771
#!/usr/bin/env ruby #!/usr/bin/env ruby
gitaly_dir = 'tmp/tests/gitaly' gitaly_dir = 'tmp/tests/gitaly'
env = { 'HOME' => File.expand_path('tmp/tests') }
args = %W[#{gitaly_dir}/gitaly #{gitaly_dir}/config.toml] args = %W[#{gitaly_dir}/gitaly #{gitaly_dir}/config.toml]
# Print the PID of the spawned process # 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')
...@@ -207,3 +207,6 @@ Shoulda::Matchers.configure do |config| ...@@ -207,3 +207,6 @@ Shoulda::Matchers.configure do |config|
with.library :rails with.library :rails
end end
end end
# Prevent Rugged from picking up local developer gitconfig.
Rugged::Settings['search_path_global'] = Rails.root.join('tmp/tests').to_s
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment