summaryrefslogtreecommitdiff
path: root/spec/tasks/gitlab/workhorse_rake_spec.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-11-24 14:19:09 +0100
committerRémy Coutable <remy@rymai.me>2016-11-30 10:35:17 +0100
commita9c250eaddf758f99ac8c868dc86f4df0cc157f4 (patch)
tree8a6e338529341e89ca407ab865f9185028c5610d /spec/tasks/gitlab/workhorse_rake_spec.rb
parentfbbf177e3b604bebce3b10f8eea8920ff5606fca (diff)
downloadgitlab-ce-a9c250eaddf758f99ac8c868dc86f4df0cc157f4.tar.gz
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.rb8
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