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>2022-12-05 06:08:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-05 06:08:47 +0300
commitf0208efd0b9afee8a00690d430e9aec2171a1955 (patch)
tree9bf10cd37233e54bcdf84dbb76d5a52aaedd56cf /spec
parentf50a7f8d970c50026e52c0b5d1c444b365d3b795 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/graphql/types/ci/pipeline_counts_type_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb2
-rw-r--r--spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb3
-rw-r--r--spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb3
-rw-r--r--spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb3
-rw-r--r--spec/lib/gitlab/database/partitioning/detached_partition_dropper_spec.rb2
-rw-r--r--spec/migrations/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3_spec.rb3
-rw-r--r--spec/migrations/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb3
-rw-r--r--spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb2
-rw-r--r--spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb2
-rw-r--r--spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb2
-rw-r--r--spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb2
-rw-r--r--spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb3
-rw-r--r--spec/migrations/confirm_support_bot_user_spec.rb2
-rw-r--r--spec/requests/api/conan_instance_packages_spec.rb2
-rw-r--r--spec/requests/api/conan_project_packages_spec.rb2
-rw-r--r--spec/services/service_ping/submit_service_ping_service_spec.rb2
-rw-r--r--spec/support/helpers/doc_url_helper.rb2
-rw-r--r--spec/support/helpers/smime_helper.rb2
-rw-r--r--spec/support/helpers/workhorse_helpers.rb8
-rw-r--r--spec/support/shared_examples/projects/container_repository/cleanup_tags_service_shared_examples.rb18
-rw-r--r--spec/support/shared_examples/services/container_expiration_policy_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/services/dependency_proxy_ttl_policies_shared_examples.rb2
-rw-r--r--spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb2
-rw-r--r--spec/tasks/gitlab/usage_data_rake_spec.rb2
-rw-r--r--spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb3
26 files changed, 37 insertions, 44 deletions
diff --git a/spec/graphql/types/ci/pipeline_counts_type_spec.rb b/spec/graphql/types/ci/pipeline_counts_type_spec.rb
index 7fdb286d253..6452827dc7b 100644
--- a/spec/graphql/types/ci/pipeline_counts_type_spec.rb
+++ b/spec/graphql/types/ci/pipeline_counts_type_spec.rb
@@ -32,7 +32,7 @@ RSpec.describe GitlabSchema.types['PipelineCounts'] do
expect(described_class).to include_graphql_fields(*expected_fields)
end
- shared_examples 'pipeline counts query' do |args: "", expected_counts:|
+ shared_examples 'pipeline counts query' do |expected_counts:, args: ""|
let_it_be(:query) do
%(
query {
diff --git a/spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb b/spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb
index fc06012ed20..c0470f26d9e 100644
--- a/spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb
+++ b/spec/lib/gitlab/background_migration/populate_vulnerability_reads_spec.rb
@@ -68,7 +68,7 @@ RSpec.describe Gitlab::BackgroundMigration::PopulateVulnerabilityReads, :migrati
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- vulnerability_id: nil, project_id:, scanner_id:, primary_identifier_id:,
+ project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb b/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
index 29cc4f34f6d..cfaa2567829 100644
--- a/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
+++ b/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
@@ -488,8 +488,7 @@ RSpec.describe Gitlab::BackgroundMigration::RecalculateVulnerabilitiesOccurrence
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: 'test')
diff --git a/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb b/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb
index 8003159f59e..3d42f345058 100644
--- a/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb
+++ b/spec/lib/gitlab/background_migration/remove_duplicate_vulnerabilities_findings_spec.rb
@@ -134,8 +134,7 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveDuplicateVulnerabilitiesFindin
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: 'test')
diff --git a/spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb b/spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
index 33ad74fbee8..2e6788a80eb 100644
--- a/spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
+++ b/spec/lib/gitlab/background_migration/remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
@@ -133,8 +133,7 @@ RSpec.describe Gitlab::BackgroundMigration::RemoveOccurrencePipelinesAndDuplicat
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: 'test')
diff --git a/spec/lib/gitlab/database/partitioning/detached_partition_dropper_spec.rb b/spec/lib/gitlab/database/partitioning/detached_partition_dropper_spec.rb
index 336dec3a8a0..646ae50fb44 100644
--- a/spec/lib/gitlab/database/partitioning/detached_partition_dropper_spec.rb
+++ b/spec/lib/gitlab/database/partitioning/detached_partition_dropper_spec.rb
@@ -41,7 +41,7 @@ RSpec.describe Gitlab::Database::Partitioning::DetachedPartitionDropper do
SQL
end
- def create_partition(name:, table: 'parent_table', from:, to:, attached:, drop_after:)
+ def create_partition(name:, from:, to:, attached:, drop_after:, table: 'parent_table')
from = from.beginning_of_month
to = to.beginning_of_month
full_name = "#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.#{name}"
diff --git a/spec/migrations/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3_spec.rb b/spec/migrations/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3_spec.rb
index 95c5be2fc30..5c68328032d 100644
--- a/spec/migrations/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3_spec.rb
+++ b/spec/migrations/20211018152654_schedule_remove_duplicate_vulnerabilities_findings3_spec.rb
@@ -131,8 +131,7 @@ RSpec.describe ScheduleRemoveDuplicateVulnerabilitiesFindings3, :migration do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: 'test')
diff --git a/spec/migrations/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb b/spec/migrations/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
index a80332aa743..fc040be31cb 100644
--- a/spec/migrations/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
+++ b/spec/migrations/20211116111644_schedule_remove_occurrence_pipelines_and_duplicate_vulnerabilities_findings_spec.rb
@@ -149,8 +149,7 @@ RSpec.describe ScheduleRemoveOccurrencePipelinesAndDuplicateVulnerabilitiesFindi
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: 'test')
diff --git a/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb
index 3e450546315..0b784b937bf 100644
--- a/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb
+++ b/spec/migrations/20220106111958_add_insert_or_update_vulnerability_reads_trigger_spec.rb
@@ -126,7 +126,7 @@ RSpec.describe AddInsertOrUpdateVulnerabilityReadsTrigger do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- vulnerability_id: nil, project_id:, scanner_id:, primary_identifier_id:,
+ project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb
index d988b1e42b9..4d901f951b3 100644
--- a/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb
+++ b/spec/migrations/20220106112043_add_update_vulnerability_reads_trigger_spec.rb
@@ -103,7 +103,7 @@ RSpec.describe AddUpdateVulnerabilityReadsTrigger do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- vulnerability_id: nil, project_id:, scanner_id:, primary_identifier_id:,
+ project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb b/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb
index 901f1cf6041..b71e1b646bd 100644
--- a/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb
+++ b/spec/migrations/20220106112085_add_update_vulnerability_reads_location_trigger_spec.rb
@@ -111,7 +111,7 @@ RSpec.describe AddUpdateVulnerabilityReadsLocationTrigger do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- vulnerability_id: nil, project_id:, scanner_id:, primary_identifier_id:,
+ project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb b/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb
index 8e50b74eb9c..3166d593cb3 100644
--- a/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb
+++ b/spec/migrations/20220106163326_add_has_issues_on_vulnerability_reads_trigger_spec.rb
@@ -109,7 +109,7 @@ RSpec.describe AddHasIssuesOnVulnerabilityReadsTrigger do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- vulnerability_id: nil, project_id:, scanner_id:, primary_identifier_id:,
+ project_id:, scanner_id:, primary_identifier_id:, vulnerability_id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location: { "image" => "alpine:3.4" }, location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb b/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb
index 44e8343256c..984aceb28dd 100644
--- a/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb
+++ b/spec/migrations/20220107064845_populate_vulnerability_reads_spec.rb
@@ -80,8 +80,7 @@ RSpec.describe PopulateVulnerabilityReads, :migration do
# rubocop:disable Metrics/ParameterLists
def create_finding!(
- id: nil,
- vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:,
+ vulnerability_id:, project_id:, scanner_id:, primary_identifier_id:, id: nil,
name: "test", severity: 7, confidence: 7, report_type: 0,
project_fingerprint: '123qweasdzxc', location_fingerprint: 'test',
metadata_version: 'test', raw_metadata: 'test', uuid: SecureRandom.uuid)
diff --git a/spec/migrations/confirm_support_bot_user_spec.rb b/spec/migrations/confirm_support_bot_user_spec.rb
index c60c7fe45f7..52a167ae8ca 100644
--- a/spec/migrations/confirm_support_bot_user_spec.rb
+++ b/spec/migrations/confirm_support_bot_user_spec.rb
@@ -72,7 +72,7 @@ RSpec.describe ConfirmSupportBotUser, :migration do
private
- def create_user!(name: 'GitLab Support Bot', email: 'support@example.com', user_type:, created_at: Time.now, confirmed_at: nil, record_timestamps: true)
+ def create_user!(user_type:, name: 'GitLab Support Bot', email: 'support@example.com', created_at: Time.now, confirmed_at: nil, record_timestamps: true)
users.create!(
name: name,
email: email,
diff --git a/spec/requests/api/conan_instance_packages_spec.rb b/spec/requests/api/conan_instance_packages_spec.rb
index d3ab676d7ee..0c1d94560b5 100644
--- a/spec/requests/api/conan_instance_packages_spec.rb
+++ b/spec/requests/api/conan_instance_packages_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe API::ConanInstancePackages do
+RSpec.describe API::ConanInstancePackages, feature_category: :package_registry do
let(:snowplow_gitlab_standard_context) { { user: user, project: project, namespace: project.namespace, property: 'i_package_conan_user' } }
include_context 'conan api setup'
diff --git a/spec/requests/api/conan_project_packages_spec.rb b/spec/requests/api/conan_project_packages_spec.rb
index c2e8ba65077..814745f9e29 100644
--- a/spec/requests/api/conan_project_packages_spec.rb
+++ b/spec/requests/api/conan_project_packages_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'spec_helper'
-RSpec.describe API::ConanProjectPackages do
+RSpec.describe API::ConanProjectPackages, feature_category: :package_registry do
include_context 'conan api setup'
let(:project_id) { project.id }
diff --git a/spec/services/service_ping/submit_service_ping_service_spec.rb b/spec/services/service_ping/submit_service_ping_service_spec.rb
index 5dbf5edb776..37231307156 100644
--- a/spec/services/service_ping/submit_service_ping_service_spec.rb
+++ b/spec/services/service_ping/submit_service_ping_service_spec.rb
@@ -340,7 +340,7 @@ RSpec.describe ServicePing::SubmitService do
end
end
- def stub_response(url: service_ping_payload_url, body:, status: 201)
+ def stub_response(body:, url: service_ping_payload_url, status: 201)
stub_full_request(url, method: :post)
.to_return(
headers: { 'Content-Type' => 'application/json' },
diff --git a/spec/support/helpers/doc_url_helper.rb b/spec/support/helpers/doc_url_helper.rb
index bbff4827c56..f98c16a3cc4 100644
--- a/spec/support/helpers/doc_url_helper.rb
+++ b/spec/support/helpers/doc_url_helper.rb
@@ -13,7 +13,7 @@ module DocUrlHelper
"#{documentation_base_url}/ee/#{path}.html"
end
- def stub_doc_file_read(file_name: 'index.md', content: )
+ def stub_doc_file_read(content:, file_name: 'index.md')
expect_file_read(File.join(Rails.root, 'doc', file_name), content: content)
end
end
diff --git a/spec/support/helpers/smime_helper.rb b/spec/support/helpers/smime_helper.rb
index fa16c433c6b..1a414c72fbb 100644
--- a/spec/support/helpers/smime_helper.rb
+++ b/spec/support/helpers/smime_helper.rb
@@ -17,7 +17,7 @@ module SmimeHelper
end
# returns a hash { key:, cert: } containing a generated key, cert pair
- def issue(email_address: 'test@example.com', cn: nil, signed_by:, expires_in:, certificate_authority:)
+ def issue(signed_by:, expires_in:, certificate_authority:, email_address: 'test@example.com', cn: nil)
key = OpenSSL::PKey::RSA.new(4096)
public_key = key.public_key
diff --git a/spec/support/helpers/workhorse_helpers.rb b/spec/support/helpers/workhorse_helpers.rb
index 6f22df9ae0f..f894aff373c 100644
--- a/spec/support/helpers/workhorse_helpers.rb
+++ b/spec/support/helpers/workhorse_helpers.rb
@@ -39,11 +39,11 @@ module WorkhorseHelpers
# workhorse_finalize will transform file_key inside params as if it was the finalize call of an inline object storage upload.
# note that based on the content of the params it can simulate a disc acceleration or an object storage upload
- def workhorse_finalize(url, method: :post, file_key:, params:, headers: {}, send_rewritten_field: false)
+ def workhorse_finalize(url, file_key:, params:, method: :post, headers: {}, send_rewritten_field: false)
workhorse_finalize_with_multiple_files(url, method: method, file_keys: file_key, params: params, headers: headers, send_rewritten_field: send_rewritten_field)
end
- def workhorse_finalize_with_multiple_files(url, method: :post, file_keys:, params:, headers: {}, send_rewritten_field: false)
+ def workhorse_finalize_with_multiple_files(url, file_keys:, params:, method: :post, headers: {}, send_rewritten_field: false)
workhorse_request_with_multiple_files(method, url,
file_keys: file_keys,
params: params,
@@ -52,11 +52,11 @@ module WorkhorseHelpers
)
end
- def workhorse_request_with_file(method, url, file_key:, params:, env: {}, extra_headers: {}, send_rewritten_field:)
+ def workhorse_request_with_file(method, url, file_key:, params:, send_rewritten_field:, env: {}, extra_headers: {})
workhorse_request_with_multiple_files(method, url, file_keys: file_key, params: params, env: env, extra_headers: extra_headers, send_rewritten_field: send_rewritten_field)
end
- def workhorse_request_with_multiple_files(method, url, file_keys:, params:, env: {}, extra_headers: {}, send_rewritten_field:)
+ def workhorse_request_with_multiple_files(method, url, file_keys:, params:, send_rewritten_field:, env: {}, extra_headers: {})
workhorse_params = params.dup
file_keys = Array(file_keys)
diff --git a/spec/support/shared_examples/projects/container_repository/cleanup_tags_service_shared_examples.rb b/spec/support/shared_examples/projects/container_repository/cleanup_tags_service_shared_examples.rb
index f7731af8dc6..7acef9efd3a 100644
--- a/spec/support/shared_examples/projects/container_repository/cleanup_tags_service_shared_examples.rb
+++ b/spec/support/shared_examples/projects/container_repository/cleanup_tags_service_shared_examples.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.shared_examples 'when regex matching everything is specified' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{ 'name_regex_delete' => '.*' }
end
@@ -65,7 +65,7 @@ RSpec.shared_examples 'when delete regex matching specific tags is used with ove
end
RSpec.shared_examples 'with allow regex value' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{
'name_regex_delete' => '.*',
@@ -80,7 +80,7 @@ RSpec.shared_examples 'with allow regex value' do
end
RSpec.shared_examples 'when keeping only N tags' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{
'name_regex' => 'A|B.*|C',
@@ -99,7 +99,7 @@ RSpec.shared_examples 'when keeping only N tags' do
end
RSpec.shared_examples 'when not keeping N tags' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{ 'name_regex' => 'A|B.*|C' }
end
@@ -115,7 +115,7 @@ RSpec.shared_examples 'when not keeping N tags' do
end
RSpec.shared_examples 'when removing keeping only 3' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{ 'name_regex_delete' => '.*',
'keep_n' => 3 }
@@ -128,7 +128,7 @@ RSpec.shared_examples 'when removing keeping only 3' do
end
RSpec.shared_examples 'when removing older than 1 day' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{
'name_regex_delete' => '.*',
@@ -143,7 +143,7 @@ RSpec.shared_examples 'when removing older than 1 day' do
end
RSpec.shared_examples 'when combining all parameters' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:params) do
{
'name_regex_delete' => '.*',
@@ -159,7 +159,7 @@ RSpec.shared_examples 'when combining all parameters' do
end
RSpec.shared_examples 'when running a container_expiration_policy' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
let(:user) { nil }
context 'with valid container_expiration_policy param' do
@@ -191,7 +191,7 @@ RSpec.shared_examples 'not removing anything' do |service_response_extra: {}, su
end
RSpec.shared_examples 'removing the expected tags' do
- |service_response_extra: {}, supports_caching: false, delete_expectations:|
+ |delete_expectations:, service_response_extra: {}, supports_caching: false|
it 'removes the expected tags' do
delete_expectations.each { |expectation| expect_delete(expectation) }
expect_no_caching unless supports_caching
diff --git a/spec/support/shared_examples/services/container_expiration_policy_shared_examples.rb b/spec/support/shared_examples/services/container_expiration_policy_shared_examples.rb
index 28bf46a57d5..38e19e58706 100644
--- a/spec/support/shared_examples/services/container_expiration_policy_shared_examples.rb
+++ b/spec/support/shared_examples/services/container_expiration_policy_shared_examples.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.shared_examples 'updating the container expiration policy attributes' do |mode:, from: {}, to:|
+RSpec.shared_examples 'updating the container expiration policy attributes' do |mode:, to:, from: {}|
if mode == :create
it 'creates a new container expiration policy' do
expect { subject }
diff --git a/spec/support/shared_examples/services/dependency_proxy_ttl_policies_shared_examples.rb b/spec/support/shared_examples/services/dependency_proxy_ttl_policies_shared_examples.rb
index f6692646ca8..dcc9c3d898f 100644
--- a/spec/support/shared_examples/services/dependency_proxy_ttl_policies_shared_examples.rb
+++ b/spec/support/shared_examples/services/dependency_proxy_ttl_policies_shared_examples.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.shared_examples 'updating the dependency proxy image ttl policy attributes' do |from: {}, to:|
+RSpec.shared_examples 'updating the dependency proxy image ttl policy attributes' do |to:, from: {}|
it_behaves_like 'not creating the dependency proxy image ttl policy'
it 'updates the dependency proxy image ttl policy' do
diff --git a/spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb b/spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb
index f7a6bd3676a..11a786fdefb 100644
--- a/spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb
+++ b/spec/support/shared_examples/services/namespace_package_settings_shared_examples.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-RSpec.shared_examples 'updating the namespace package setting attributes' do |from: {}, to:|
+RSpec.shared_examples 'updating the namespace package setting attributes' do |to:, from: {}|
it_behaves_like 'not creating the namespace package setting'
it 'updates the namespace package setting' do
diff --git a/spec/tasks/gitlab/usage_data_rake_spec.rb b/spec/tasks/gitlab/usage_data_rake_spec.rb
index 7ddba4ceb9b..98744199f9d 100644
--- a/spec/tasks/gitlab/usage_data_rake_spec.rb
+++ b/spec/tasks/gitlab/usage_data_rake_spec.rb
@@ -80,7 +80,7 @@ RSpec.describe 'gitlab:usage data take tasks', :silence_stdout do
private
- def stub_response(url: service_ping_payload_url, body:, status: 201)
+ def stub_response(body:, url: service_ping_payload_url, status: 201)
stub_full_request(url, method: :post)
.to_return(
headers: { 'Content-Type' => 'application/json' },
diff --git a/spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb b/spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb
index 3cb83a7a5d7..8eda943f36e 100644
--- a/spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb
+++ b/spec/workers/container_expiration_policies/cleanup_container_repository_worker_spec.rb
@@ -398,8 +398,7 @@ RSpec.describe ContainerExpirationPolicies::CleanupContainerRepositoryWorker do
end
def cleanup_service_response(
- status: :finished,
- repository:,
+ repository:, status: :finished,
cleanup_tags_service_original_size: 100,
cleanup_tags_service_before_truncate_size: 80,
cleanup_tags_service_after_truncate_size: 80,