diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2017-10-03 16:58:33 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-10-03 16:58:33 +0000 |
commit | 5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762 (patch) | |
tree | f29535350ca0fe47d6c9fbddf8a915365b39d281 /spec/workers | |
parent | 6e0d17b8c605218ef5df8337fa573caa887bf41f (diff) | |
download | gitlab-ce-5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762.tar.gz |
Hide Gollum inside Gitlab::Git::Wiki
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/repository_check/single_repository_worker_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/workers/repository_check/single_repository_worker_spec.rb b/spec/workers/repository_check/single_repository_worker_spec.rb index d2609d21546..1d9bbf2ca62 100644 --- a/spec/workers/repository_check/single_repository_worker_spec.rb +++ b/spec/workers/repository_check/single_repository_worker_spec.rb @@ -69,7 +69,12 @@ describe RepositoryCheck::SingleRepositoryWorker do end def break_wiki(project) - FileUtils.rm_rf(wiki_path(project) + '/objects') + objects_dir = wiki_path(project) + '/objects' + + # Replace the /objects directory with a file so that the repo is + # invalid, _and_ 'git init' cannot fix it. + FileUtils.rm_rf(objects_dir) + FileUtils.touch(objects_dir) if File.directory?(wiki_path(project)) end def wiki_path(project) |