diff options
author | James Lopez <james@jameslopez.es> | 2017-12-14 11:49:35 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-04 11:22:43 +0100 |
commit | 260935868acfb7c0cb720088d4f8c4c1c1088ddb (patch) | |
tree | c36ca5bef8cb9dd079705e59856ad11f29fbf109 /spec/tasks | |
parent | ac409fb44402622dfd6abb076f7a85df4b27d39d (diff) | |
download | gitlab-ce-260935868acfb7c0cb720088d4f8c4c1c1088ddb.tar.gz |
add new git fsck rake task and spec
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/gitlab/git_rake_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/git_rake_spec.rb b/spec/tasks/gitlab/git_rake_spec.rb new file mode 100644 index 00000000000..63a7f7efe73 --- /dev/null +++ b/spec/tasks/gitlab/git_rake_spec.rb @@ -0,0 +1,27 @@ +require 'rake_helper' + +describe 'gitlab:git rake tasks' do + before do + Rake.application.rake_require 'tasks/gitlab/git' + + stub_warn_user_is_not_gitlab + + FileUtils.mkdir(Settings.absolute('tmp/tests/default_storage')) + end + + after do + FileUtils.rm_rf(Settings.absolute('tmp/tests/default_storage')) + end + + describe 'fsck' do + let(:storages) do + { 'default' => { 'path' => Settings.absolute('tmp/tests/default_storage') } } + end + + it 'outputs the right git command' do + expect(Kernel).to receive(:system).with('').and_return(true) + + run_rake_task('gitlab:git:fsck') + end + end +end |