Commit 235cb87e authored by Nick Thomas's avatar Nick Thomas

CE->EE merge: resolve conflicts in gitaly support code

parent 0e4f747b
......@@ -21,11 +21,7 @@ namespace :gitlab do
create_gitaly_configuration
# In CI we run scripts/gitaly-test-build instead of this command
unless ENV['CI'].present?
<<<<<<< HEAD
Bundler.with_original_env { run_command!(%w[/usr/bin/env -u BUNDLE_GEMFILE] + [command]) }
=======
Bundler.with_original_env { run_command!([command]) }
>>>>>>> ce/master
end
end
end
......
#!/usr/bin/env ruby
<<<<<<< HEAD
=======
require 'fileutils'
>>>>>>> ce/master
# This script assumes tmp/tests/gitaly already contains the correct
# Gitaly version. We just have to compile it and run its 'bundle
# install'. We have this separate script for that because weird things
......@@ -12,9 +9,6 @@ require 'fileutils'
# called 'bundle install' using a different Gemfile, as happens with
# gitlab-ce and gitaly.
<<<<<<< HEAD
abort 'gitaly build failed' unless system('make', chdir: 'tmp/tests/gitaly')
=======
dir = 'tmp/tests/gitaly'
abort 'gitaly build failed' unless system('make', chdir: dir)
......@@ -23,4 +17,3 @@ abort 'gitaly build failed' unless system('make', chdir: dir)
# Without this a gitaly executable created in the setup-test-env job
# will look stale compared to GITALY_SERVER_VERSION.
FileUtils.touch(File.join(dir, 'gitaly'), mtime: Time.now + (1 << 24))
>>>>>>> ce/master
......@@ -41,11 +41,6 @@ describe 'gitlab:gitaly namespace rake task' do
end
describe 'gmake/make' do
<<<<<<< HEAD
let(:command_preamble) { %w[/usr/bin/env -u BUNDLE_GEMFILE] }
=======
>>>>>>> ce/master
before(:all) do
@old_env_ci = ENV.delete('CI')
end
......@@ -62,12 +57,12 @@ describe 'gitlab:gitaly namespace rake task' do
context 'gmake is available' do
before do
expect_any_instance_of(Object).to receive(:checkout_or_clone_version)
allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['gmake']).and_return(true)
allow_any_instance_of(Object).to receive(:run_command!).with(['gmake']).and_return(true)
end
it 'calls gmake in the gitaly directory' do
expect(Gitlab::Popen).to receive(:popen).with(%w[which gmake]).and_return(['/usr/bin/gmake', 0])
expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['gmake']).and_return(true)
expect_any_instance_of(Object).to receive(:run_command!).with(['gmake']).and_return(true)
run_rake_task('gitlab:gitaly:install', clone_path)
end
......@@ -76,12 +71,12 @@ describe 'gitlab:gitaly namespace rake task' do
context 'gmake is not available' do
before do
expect_any_instance_of(Object).to receive(:checkout_or_clone_version)
allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true)
allow_any_instance_of(Object).to receive(:run_command!).with(['make']).and_return(true)
end
it 'calls make in the gitaly directory' do
expect(Gitlab::Popen).to receive(:popen).with(%w[which gmake]).and_return(['', 42])
expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true)
expect_any_instance_of(Object).to receive(:run_command!).with(['make']).and_return(true)
run_rake_task('gitlab:gitaly:install', clone_path)
end
......
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