From f400c4f56008813f54f756bd19d007adfe8ef827 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Tue, 9 Jan 2018 01:26:26 -0800 Subject: Add a create-hooks command for import Rake task With the introduction of hashed storage, the import Rake task needs to be able to copy a repo and then initialize the hooks as a separate step from creating the project directory. Relates to gitlab-org/gitlab-ce#41739 and https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16280 --- spec/gitlab_projects_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'spec') diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 7cf408b..7eb0593 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -55,6 +55,21 @@ describe GitlabProjects do it { File.readlink(hooks_dir).should == target_hooks_dir } end + + context 'with command-line arguments' do + before do + FileUtils.mkdir_p repo_path + argv('create-hooks', tmp_repos_path, 'hook-test.git') + gl_projects = GitlabProjects.new + gl_projects.exec + end + + after do + FileUtils.rm_f(repo_path) + end + + it { File.readlink(hooks_dir).should == target_hooks_dir } + end end describe :initialize do -- cgit v1.2.1