diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-04 15:59:30 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-04 15:59:30 +0200 |
commit | 805a28e6a134b59ab3efa3ff6d6b0e16bd24c950 (patch) | |
tree | f8079eec4dc4bf468895f85ef63bab52b3aefa20 /spec/tasks | |
parent | 8fff6a3422e07ad45c1e8875476427eb81bb0e2e (diff) | |
download | gitlab-ce-805a28e6a134b59ab3efa3ff6d6b0e16bd24c950.tar.gz |
Revert "Merge branch 'fix-gitaly-install' into 'master'"
This reverts commit 23c502b43404aa70741462da5d57c23196f6088a, reversing
changes made to 1018ab0516fd94d1ffbc05a0ad8499947dd9630d.
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/gitlab/gitaly_rake_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb index a2f4ec39d89..695231c7d15 100644 --- a/spec/tasks/gitlab/gitaly_rake_spec.rb +++ b/spec/tasks/gitlab/gitaly_rake_spec.rb @@ -41,6 +41,8 @@ describe 'gitlab:gitaly namespace rake task' do end describe 'gmake/make' do + let(:command_preamble) { %w[/usr/bin/env -u BUNDLE_GEMFILE] } + before(:all) do @old_env_ci = ENV.delete('CI') end @@ -57,12 +59,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(['gmake']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['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(['gmake']).and_return(true) + expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['gmake']).and_return(true) run_rake_task('gitlab:gitaly:install', clone_path) end @@ -71,12 +73,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(['make']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['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(['make']).and_return(true) + expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true) run_rake_task('gitlab:gitaly:install', clone_path) end |