debian-mirror-gitlab/spec/tasks/gitlab/shell_rake_spec.rb

26 lines
763 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'rake_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe 'gitlab:shell rake tasks' do
2017-08-17 22:00:37 +05:30
before do
Rake.application.rake_require 'tasks/gitlab/shell'
stub_warn_user_is_not_gitlab
end
describe 'install task' do
2019-09-04 21:01:54 +05:30
it 'installs and compiles gitlab-shell' do
2018-11-08 19:23:39 +05:30
storages = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
Gitlab.config.repositories.storages.values.map(&:legacy_disk_path)
end
2019-12-21 20:55:43 +05:30
expect_any_instance_of(Gitlab::TaskHelpers).to receive(:checkout_or_clone_version)
allow(Kernel).to receive(:system).with('bin/install', *storages).and_return(true)
2019-12-26 22:10:19 +05:30
allow(Kernel).to receive(:system).with('make', 'build').and_return(true)
2017-08-17 22:00:37 +05:30
run_rake_task('gitlab:shell:install')
end
end
end