2019-10-15 05:06:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-14 05:49:35 -05:00
|
|
|
require 'rake_helper'
|
|
|
|
|
|
|
|
describe 'gitlab:git rake tasks' do
|
2018-07-03 18:20:51 -04:00
|
|
|
let(:base_path) { 'tmp/tests/default_storage' }
|
2018-07-24 06:17:29 -04:00
|
|
|
let!(:project) { create(:project, :repository) }
|
2018-03-14 09:42:49 -04:00
|
|
|
|
2017-12-14 05:49:35 -05:00
|
|
|
before do
|
|
|
|
Rake.application.rake_require 'tasks/gitlab/git'
|
|
|
|
|
2018-01-04 05:02:43 -05:00
|
|
|
allow_any_instance_of(String).to receive(:color) { |string, _color| string }
|
|
|
|
|
2017-12-14 08:53:34 -05:00
|
|
|
stub_warn_user_is_not_gitlab
|
2017-12-14 05:49:35 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
describe 'fsck' do
|
2018-01-04 05:02:43 -05:00
|
|
|
it 'outputs the integrity check for a repo' do
|
2018-07-24 06:17:29 -04:00
|
|
|
expect { run_rake_task('gitlab:git:fsck') }.to output(/Performed integrity check for/).to_stdout
|
2018-01-03 09:32:16 -05:00
|
|
|
end
|
2017-12-14 05:49:35 -05:00
|
|
|
end
|
|
|
|
end
|