diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-24 16:19:09 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-30 12:35:17 +0300 |
commit | a9c250eaddf758f99ac8c868dc86f4df0cc157f4 (patch) | |
tree | 8a6e338529341e89ca407ab865f9185028c5610d /spec/tasks/gitlab/workhorse_rake_spec.rb | |
parent | fbbf177e3b604bebce3b10f8eea8920ff5606fca (diff) |
Add #run_command! to task helpers to raise a TaskFailedError if status is not 0
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/tasks/gitlab/workhorse_rake_spec.rb')
-rw-r--r-- | spec/tasks/gitlab/workhorse_rake_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/tasks/gitlab/workhorse_rake_spec.rb b/spec/tasks/gitlab/workhorse_rake_spec.rb index c8ad004282a..87bc1b128bf 100644 --- a/spec/tasks/gitlab/workhorse_rake_spec.rb +++ b/spec/tasks/gitlab/workhorse_rake_spec.rb @@ -88,12 +88,12 @@ describe 'gitlab:workhorse namespace rake task' do context 'gmake is available' do before do expect_any_instance_of(Object).to receive(:checkout_or_clone_tag) - allow_any_instance_of(Object).to receive(:run_command).with(['gmake']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(['gmake']).and_return(true) end it 'calls gmake in the gitlab-workhorse 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(['gmake']).and_return(true) run_rake_task('gitlab:workhorse:install', clone_path) end @@ -102,12 +102,12 @@ describe 'gitlab:workhorse namespace rake task' do context 'gmake is not available' do before do expect_any_instance_of(Object).to receive(:checkout_or_clone_tag) - allow_any_instance_of(Object).to receive(:run_command).with(['make']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(['make']).and_return(true) end it 'calls make in the gitlab-workhorse 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(['make']).and_return(true) run_rake_task('gitlab:workhorse:install', clone_path) end |