diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-08 09:39:49 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-08 09:39:49 +0000 |
commit | feb8974cc87455328dea708be556e41b59e8ba26 (patch) | |
tree | b19b97094cd9296b049dcd2112cb9d1fd4e38edc /spec/tasks | |
parent | 079df3121409198bcba232a1678125a6c83118de (diff) | |
parent | 21937a157d435025d4ae0cf514fe7273302e1004 (diff) | |
download | gitlab-ce-feb8974cc87455328dea708be556e41b59e8ba26.tar.gz |
Merge branch '35941-fix-testing-issue-following-gitaly-install-fix' into 'master'
Unset the `RUBYOPT` env variable before installing `gitaly-ruby`
Closes #35941 and #35967
See merge request !13313
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 6d453c19fc3..cc932a4ec4c 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 RUBYOPT] } + 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 |