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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-25 12:09:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-25 12:09:38 +0300
commit91a7f1897e7cb14d60c2aaf3afa76ebdc879d939 (patch)
tree111f4cd313d84a58852a454c605f7bf9e5524e4c /spec
parent3146b64c517a37529e440f7724e147dbfdfbeb9c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/admin/dashboard_controller_spec.rb3
-rw-r--r--spec/lib/bulk_imports/clients/http_spec.rb14
-rw-r--r--spec/support/rspec_order_todo.yml4
3 files changed, 14 insertions, 7 deletions
diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb
index bfbd2ca946f..e3d579a631c 100644
--- a/spec/controllers/admin/dashboard_controller_spec.rb
+++ b/spec/controllers/admin/dashboard_controller_spec.rb
@@ -11,7 +11,8 @@ RSpec.describe Admin::DashboardController do
it 'retrieves Redis versions' do
get :index
- expect(assigns[:redis_versions].length).to eq(1)
+ # specs are run against both Redis and Redis Cluster instances.
+ expect(assigns[:redis_versions].length).to be > 0
end
context 'with pending_delete projects' do
diff --git a/spec/lib/bulk_imports/clients/http_spec.rb b/spec/lib/bulk_imports/clients/http_spec.rb
index aff049408e2..bf1bfb77b26 100644
--- a/spec/lib/bulk_imports/clients/http_spec.rb
+++ b/spec/lib/bulk_imports/clients/http_spec.rb
@@ -33,11 +33,17 @@ RSpec.describe BulkImports::Clients::HTTP, feature_category: :importers do
end
context 'error handling' do
- context 'when error occurred' do
- it 'raises BulkImports::NetworkError' do
- allow(Gitlab::HTTP).to receive(method).and_raise(Errno::ECONNREFUSED)
+ context 'when any known HTTP error occurs' do
+ using RSpec::Parameterized::TableSyntax
+
+ where(:exception_class) { Gitlab::HTTP::HTTP_ERRORS }
+
+ with_them do
+ it 'raises BulkImports::NetworkError' do
+ allow(Gitlab::HTTP).to receive(method).and_raise(exception_class)
- expect { subject.public_send(method, resource) }.to raise_exception(BulkImports::NetworkError)
+ expect { subject.public_send(method, resource) }.to raise_exception(BulkImports::NetworkError)
+ end
end
end
diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml
index ee0854c2483..01875aadacb 100644
--- a/spec/support/rspec_order_todo.yml
+++ b/spec/support/rspec_order_todo.yml
@@ -161,7 +161,7 @@
- './ee/spec/controllers/projects/subscriptions_controller_spec.rb'
- './ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb'
- './ee/spec/controllers/registrations/company_controller_spec.rb'
-- './ee/spec/controllers/registrations/groups_projects_controller_spec.rb'
+- './ee/spec/controllers/registrations/groups_controller_spec.rb'
- './ee/spec/controllers/repositories/git_http_controller_spec.rb'
- './ee/spec/controllers/security/dashboard_controller_spec.rb'
- './ee/spec/controllers/security/projects_controller_spec.rb'
@@ -3079,7 +3079,7 @@
- './ee/spec/views/projects/security/policies/index.html.haml_spec.rb'
- './ee/spec/views/projects/security/sast_configuration/show.html.haml_spec.rb'
- './ee/spec/views/projects/settings/subscriptions/_index.html.haml_spec.rb'
-- './ee/spec/views/registrations/groups_projects/new.html.haml_spec.rb'
+- './ee/spec/views/registrations/groups/new.html.haml_spec.rb'
- './ee/spec/views/shared/billings/_billing_plan_actions.html.haml_spec.rb'
- './ee/spec/views/shared/billings/_billing_plan.html.haml_spec.rb'
- './ee/spec/views/shared/billings/_billing_plans.html.haml_spec.rb'