diff options
author | James Lopez <james@jameslopez.es> | 2018-01-03 17:32:16 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-04 13:22:43 +0300 |
commit | 5b9e7773766eebbe73bb400025de002962532a7c (patch) | |
tree | 5ad5055cb83c050d2110054df02846b02d1f12e6 /spec | |
parent | f8e1b44dc5d2a78676672dfc7d44c17e6defeda6 (diff) |
add lock specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/tasks/gitlab/git_rake_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/git_rake_spec.rb b/spec/tasks/gitlab/git_rake_spec.rb index 19d298fb36d..44a2607bea2 100644 --- a/spec/tasks/gitlab/git_rake_spec.rb +++ b/spec/tasks/gitlab/git_rake_spec.rb @@ -21,5 +21,18 @@ describe 'gitlab:git rake tasks' do it 'outputs the right git command' do expect { run_rake_task('gitlab:git:fsck') }.to output(/Performed Checking integrity/).to_stdout end + + it 'errors out about config.lock issues' do + FileUtils.touch(Settings.absolute('tmp/tests/default_storage/@repo/1/2/test.git/config.lock')) + + expect { run_rake_task('gitlab:git:fsck') }.to output(/file exists\? ... yes/).to_stdout + end + + it 'errors out about ref lock issues' do + FileUtils.mkdir_p(Settings.absolute('tmp/tests/default_storage/@repo/1/2/test.git/refs/heads')) + FileUtils.touch(Settings.absolute('tmp/tests/default_storage/@repo/1/2/test.git/refs/heads/blah.lock')) + + expect { run_rake_task('gitlab:git:fsck') }.to output(/Ref lock files exist:/).to_stdout + end end end |