Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-10-03 19:58:33 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-10-03 19:58:33 +0300
commit5dd26d4e5a5a27ca93e6d55b4261c42f4f70e762 (patch)
treef29535350ca0fe47d6c9fbddf8a915365b39d281 /spec/workers/repository_check
parent6e0d17b8c605218ef5df8337fa573caa887bf41f (diff)
Hide Gollum inside Gitlab::Git::Wiki
Diffstat (limited to 'spec/workers/repository_check')
-rw-r--r--spec/workers/repository_check/single_repository_worker_spec.rb7
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)