diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2016-04-28 16:07:06 +0000 |
---|---|---|
committer | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2016-04-28 16:07:06 +0000 |
commit | 9bf99423613caeff16a548632de2c8241c09f404 (patch) | |
tree | 6232425646e18a4e5f98baca7020cdaa719ae7f0 /spec/gitlab_projects_spec.rb | |
parent | 3f942ef589a4b9bc1d9ed7fd0aaf9e186be57935 (diff) | |
parent | 1f0a77ca564ee4aaf47f9d78c76e3b39c3d0f713 (diff) | |
download | gitlab-shell-9bf99423613caeff16a548632de2c8241c09f404.tar.gz |
Merge branch 'remove-update-head' into 'master'
Remove the update-head command since GitLab doesn't use it anymore
It looks like we tend to remove commands that are not used by GitLab anymore (see gitlab-org/gitlab-shell!26) and the `update-head` command will soon be in that case (see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3705), so I think we should remove it from here too.
Note: I'm setting this as a WIP to ensure this doesn't get merged since the GitLab MR is not merged at that moment.
See merge request !51
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r-- | spec/gitlab_projects_spec.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb index 47582f3..eeebf87 100644 --- a/spec/gitlab_projects_spec.rb +++ b/spec/gitlab_projects_spec.rb @@ -205,33 +205,6 @@ describe GitlabProjects do end end - describe :update_head do - let(:gl_projects) { build_gitlab_projects('update-head', repo_name, 'stable') } - let(:gl_projects_fail) { build_gitlab_projects 'update-head', repo_name } - - before do - FileUtils.mkdir_p(tmp_repo_path) - system(*%W(git init --bare #{tmp_repo_path})) - FileUtils.touch(File.join(tmp_repo_path, "refs/heads/stable")) - File.read(File.join(tmp_repo_path, 'HEAD')).strip.should == 'ref: refs/heads/master' - end - - it "should update head for repo" do - gl_projects.exec.should be_true - File.read(File.join(tmp_repo_path, 'HEAD')).strip.should == 'ref: refs/heads/stable' - end - - it "should log an update_head event" do - $logger.should_receive(:info).with("Update head in project #{repo_name} to <stable>.") - gl_projects.exec - end - - it "should failed and log an error" do - $logger.should_receive(:error).with("update-head failed: no branch provided.") - gl_projects_fail.exec.should be_false - end - end - describe :import_project do context 'success import' do let(:gl_projects) { build_gitlab_projects('import-project', repo_name, 'https://github.com/randx/six.git') } |