summaryrefslogtreecommitdiff
path: root/spec/gitlab_projects_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/gitlab_projects_spec.rb')
-rw-r--r--spec/gitlab_projects_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/gitlab_projects_spec.rb b/spec/gitlab_projects_spec.rb
index 5e50af0..19646e3 100644
--- a/spec/gitlab_projects_spec.rb
+++ b/spec/gitlab_projects_spec.rb
@@ -213,6 +213,7 @@ describe GitlabProjects do
before do
FileUtils.mkdir_p(tmp_repo_path)
FileUtils.mkdir_p(alternative_storage_path)
+ allow_any_instance_of(GitlabReferenceCounter).to receive(:value).and_return(0)
end
after { FileUtils.rm_rf(alternative_storage_path) }
@@ -235,6 +236,12 @@ describe GitlabProjects do
bad_source.exec.should be_false
end
+ it "should fail if there are pushes ongoing" do
+ allow_any_instance_of(GitlabReferenceCounter).to receive(:value).and_return(1)
+ $logger.should_receive(:error).with("mv-storage failed: source path <#{tmp_repo_path}> is waiting for pushes to finish.")
+ gl_projects.exec.should be_false
+ end
+
it "should log an mv-storage event" do
message = "Syncing project #{repo_name} from <#{tmp_repo_path}> to <#{new_repo_path}>."
$logger.should_receive(:info).with(message)