2019-10-15 09:06:09 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-03 04:46:43 +00:00
|
|
|
require 'rake_helper'
|
|
|
|
|
|
|
|
describe 'gitlab:shell rake tasks' do
|
|
|
|
before do
|
|
|
|
Rake.application.rake_require 'tasks/gitlab/shell'
|
|
|
|
|
|
|
|
stub_warn_user_is_not_gitlab
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'install task' do
|
2019-05-29 12:07:48 +00:00
|
|
|
it 'installs and compiles gitlab-shell' do
|
2018-06-05 15:58:28 +00:00
|
|
|
storages = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
|
|
|
Gitlab.config.repositories.storages.values.map(&:legacy_disk_path)
|
|
|
|
end
|
2019-10-18 15:06:05 +00:00
|
|
|
|
|
|
|
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-10-21 15:05:58 +00:00
|
|
|
allow(Kernel).to receive(:system).with('make', 'build').and_return(true)
|
2017-05-02 15:44:40 +00:00
|
|
|
|
2016-08-03 04:46:43 +00:00
|
|
|
run_rake_task('gitlab:shell:install')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|