2016-08-03 00:46:43 -04: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 08:07:48 -04:00
|
|
|
it 'installs and compiles gitlab-shell' do
|
2018-06-05 11:58:28 -04:00
|
|
|
storages = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
|
|
|
|
Gitlab.config.repositories.storages.values.map(&:legacy_disk_path)
|
|
|
|
end
|
2017-05-02 11:44:40 -04:00
|
|
|
expect(Kernel).to receive(:system).with('bin/install', *storages).and_call_original
|
|
|
|
expect(Kernel).to receive(:system).with('bin/compile').and_call_original
|
|
|
|
|
2016-08-03 00:46:43 -04:00
|
|
|
run_rake_task('gitlab:shell:install')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|