diff options
author | Stan Hu <stanhu@gmail.com> | 2018-01-07 21:01:18 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-01-09 23:39:19 -0800 |
commit | 35d3411f774c8ad590e15180904a0493a774ec80 (patch) | |
tree | d78249f24ba437a9a5e57d1c5a383e335b59ad74 /spec/lib | |
parent | 3576d59ae95a61dd20e997a619dbc6c8e8a70276 (diff) | |
download | gitlab-ce-35d3411f774c8ad590e15180904a0493a774ec80.tar.gz |
Fix hooks not being set up properly for bare import Rake tasksh-fix-bare-import-hooks
Closes #41739
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/bare_repository_import/importer_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/lib/gitlab/bare_repository_import/importer_spec.rb b/spec/lib/gitlab/bare_repository_import/importer_spec.rb index b5d86df09d2..f302e412a6e 100644 --- a/spec/lib/gitlab/bare_repository_import/importer_spec.rb +++ b/spec/lib/gitlab/bare_repository_import/importer_spec.rb @@ -74,14 +74,18 @@ describe Gitlab::BareRepositoryImport::Importer, repository: true do importer.create_project_if_needed end - it 'creates the Git repo in disk' do + it 'creates the Git repo on disk with the proper symlink for hooks' do create_bare_repository("#{project_path}.git") importer.create_project_if_needed project = Project.find_by_full_path(project_path) + repo_path = File.join(project.repository_storage_path, project.disk_path + '.git') + hook_path = File.join(repo_path, 'hooks') - expect(File).to exist(File.join(project.repository_storage_path, project.disk_path + '.git')) + expect(File).to exist(repo_path) + expect(File.symlink?(hook_path)).to be true + expect(File.readlink(hook_path)).to eq(Gitlab.config.gitlab_shell.hooks_path) end context 'hashed storage enabled' do |