summaryrefslogtreecommitdiff
path: root/spec/tasks/gitlab/shell_rake_spec.rb
blob: c3e912b02c51a8191519911a913b563d9463bc75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
    it 'installs and compiles gitlab-shell' do
      storages = Gitlab::GitalyClient::StorageSettings.allow_disk_access do
        Gitlab.config.repositories.storages.values.map(&:legacy_disk_path)
      end
      expect(Kernel).to receive(:system).with('bin/install', *storages).and_call_original
      expect(Kernel).to receive(:system).with('bin/compile').and_call_original

      run_rake_task('gitlab:shell:install')
    end
  end
end