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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-07 00:12:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-07 00:12:16 +0300
commit87598f1576cc7b3e1071a83d70778a51009b853b (patch)
tree42a1e678a3f9abf870d1cc88ecf536375f889b12 /spec/controllers/projects
parent30e5ae4c2b9c1674dc222e4bde0daa3f9795782e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/branches_controller_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb
index 46799d473f8..43e8bbd83cf 100644
--- a/spec/controllers/projects/branches_controller_spec.rb
+++ b/spec/controllers/projects/branches_controller_spec.rb
@@ -656,6 +656,26 @@ RSpec.describe Projects::BranchesController do
)
end
end
+
+ context 'when gitaly is not available' do
+ before do
+ allow_next_instance_of(Gitlab::GitalyClient::RefService) do |ref_service|
+ allow(ref_service).to receive(:local_branches).and_raise(GRPC::DeadlineExceeded)
+ end
+
+ get :index, format: :html, params: {
+ namespace_id: project.namespace, project_id: project
+ }
+ end
+
+ it 'returns with a status 200' do
+ expect(response).to have_gitlab_http_status(:ok)
+ end
+
+ it 'sets gitaly_unavailable variable' do
+ expect(assigns[:gitaly_unavailable]).to be_truthy
+ end
+ end
end
describe 'GET diverging_commit_counts' do