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-09-06 15:11:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-06 15:11:14 +0300
commitab7ca19e6844c37a715e378801409e297fd51512 (patch)
treecc09891376cf53f63fd17bb6f739295620cf1ac1 /spec/services
parentaea64c367b180ea549aa115d8312b7c1832bc0b3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/application_settings/update_service_spec.rb22
-rw-r--r--spec/services/ci/pipelines/add_job_service_spec.rb12
-rw-r--r--spec/services/projects/create_service_spec.rb6
-rw-r--r--spec/services/projects/update_pages_service_spec.rb12
4 files changed, 28 insertions, 24 deletions
diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb
index dabff37bea7..a0c30620302 100644
--- a/spec/services/application_settings/update_service_spec.rb
+++ b/spec/services/application_settings/update_service_spec.rb
@@ -336,6 +336,28 @@ RSpec.describe ApplicationSettings::UpdateService do
end
end
+ context 'when general rate limits are passed' do
+ let(:params) do
+ {
+ throttle_authenticated_api_enabled: true,
+ throttle_authenticated_api_period_in_seconds: 10,
+ throttle_authenticated_api_requests_per_period: 20,
+ throttle_authenticated_web_enabled: true,
+ throttle_authenticated_web_period_in_seconds: 30,
+ throttle_authenticated_web_requests_per_period: 40,
+ throttle_unauthenticated_enabled: true,
+ throttle_unauthenticated_period_in_seconds: 50,
+ throttle_unauthenticated_requests_per_period: 60
+ }
+ end
+
+ it 'updates general throttle settings' do
+ subject.execute
+
+ expect(application_settings.reload).to have_attributes(params)
+ end
+ end
+
context 'when package registry rate limits are passed' do
let(:params) do
{
diff --git a/spec/services/ci/pipelines/add_job_service_spec.rb b/spec/services/ci/pipelines/add_job_service_spec.rb
index bdf7e577fa8..3a77d26dd9e 100644
--- a/spec/services/ci/pipelines/add_job_service_spec.rb
+++ b/spec/services/ci/pipelines/add_job_service_spec.rb
@@ -59,18 +59,6 @@ RSpec.describe Ci::Pipelines::AddJobService do
end
end
- context 'when the FF ci_fix_commit_status_retried is disabled' do
- before do
- stub_feature_flags(ci_fix_commit_status_retried: false)
- end
-
- it 'does not call update_older_statuses_retried!' do
- expect(job).not_to receive(:update_older_statuses_retried!)
-
- execute
- end
- end
-
context 'exclusive lock' do
let(:lock_uuid) { 'test' }
let(:lock_key) { "ci:pipelines:#{pipeline.id}:add-job" }
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index 9455995c47c..e15d9341fd1 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -346,6 +346,12 @@ RSpec.describe Projects::CreateService, '#execute' do
expect(imported_project.import_data.data).to eq(import_data[:data])
expect(imported_project.import_url).to eq('http://import-url')
end
+
+ it 'tracks for the combined_registration experiment', :experiment do
+ expect(experiment(:combined_registration)).to track(:import_project).on_next_instance
+
+ imported_project
+ end
end
context 'builds_enabled global setting' do
diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb
index 1edcbd01861..2a0c794cebb 100644
--- a/spec/services/projects/update_pages_service_spec.rb
+++ b/spec/services/projects/update_pages_service_spec.rb
@@ -295,18 +295,6 @@ RSpec.describe Projects::UpdatePagesService do
expect(older_deploy_job.reload).to be_retried
end
-
- context 'when FF ci_fix_commit_status_retried is disabled' do
- before do
- stub_feature_flags(ci_fix_commit_status_retried: false)
- end
-
- it 'does not mark older pages:deploy jobs retried' do
- expect(execute).to eq(:success)
-
- expect(older_deploy_job.reload).not_to be_retried
- end
- end
end
private