diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/features/admin/admin_settings_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/features/admin/admin_settings_spec.rb')
-rw-r--r-- | spec/features/admin/admin_settings_spec.rb | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/spec/features/admin/admin_settings_spec.rb b/spec/features/admin/admin_settings_spec.rb index 4cdc3df978d..79b3f049047 100644 --- a/spec/features/admin/admin_settings_spec.rb +++ b/spec/features/admin/admin_settings_spec.rb @@ -71,7 +71,7 @@ RSpec.describe 'Admin updates settings' do it 'change Visibility and Access Controls' do page.within('.as-visibility-access') do - uncheck 'Project export enabled' + uncheck 'Enabled' click_button 'Save changes' end @@ -111,6 +111,16 @@ RSpec.describe 'Admin updates settings' do expect(page).to have_content "Application settings saved successfully" end + it 'change Maximum export size' do + page.within('.as-account-limit') do + fill_in 'Maximum export size (MB)', with: 25 + click_button 'Save changes' + end + + expect(current_settings.max_export_size).to eq 25 + expect(page).to have_content "Application settings saved successfully" + end + it 'change Maximum import size' do page.within('.as-account-limit') do fill_in 'Maximum import size (MB)', with: 15 @@ -370,7 +380,7 @@ RSpec.describe 'Admin updates settings' do expect(current_settings.valid_runner_registrars).to eq(ApplicationSetting::VALID_RUNNER_REGISTRAR_TYPES) page.within('.as-runner') do - find_all('.form-check-input').each(&:click) + find_all('input[type="checkbox"]').each(&:click) click_button 'Save changes' end @@ -396,7 +406,6 @@ RSpec.describe 'Admin updates settings' do end context 'Container Registry' do - let(:feature_flag_enabled) { true } let(:client_support) { true } let(:settings_titles) do { @@ -409,18 +418,9 @@ RSpec.describe 'Admin updates settings' do before do stub_container_registry_config(enabled: true) - stub_feature_flags(container_registry_expiration_policies_throttling: feature_flag_enabled) allow(ContainerRegistry::Client).to receive(:supports_tag_delete?).and_return(client_support) end - shared_examples 'not having container registry setting' do |registry_setting| - it "lacks the container setting #{registry_setting}" do - visit ci_cd_admin_application_settings_path - - expect(page).not_to have_content(settings_titles[registry_setting]) - end - end - %i[container_registry_delete_tags_service_timeout container_registry_expiration_policies_worker_capacity container_registry_cleanup_tags_service_max_list_size].each do |setting| context "for container registry setting #{setting}" do it 'changes the setting' do @@ -434,12 +434,6 @@ RSpec.describe 'Admin updates settings' do expect(current_settings.public_send(setting)).to eq(400) expect(page).to have_content "Application settings saved successfully" end - - context 'with feature flag disabled' do - let(:feature_flag_enabled) { false } - - it_behaves_like 'not having container registry setting', setting - end end end @@ -457,12 +451,6 @@ RSpec.describe 'Admin updates settings' do expect(current_settings.container_registry_expiration_policies_caching).to eq(!old_value) expect(page).to have_content "Application settings saved successfully" end - - context 'with feature flag disabled' do - let(:feature_flag_enabled) { false } - - it_behaves_like 'not having container registry setting', :container_registry_expiration_policies_caching - end end end end @@ -665,7 +653,7 @@ RSpec.describe 'Admin updates settings' do visit network_admin_application_settings_path page.within('.as-issue-limits') do - fill_in 'Max requests per minute per user', with: 0 + fill_in 'Maximum number of requests per minute', with: 0 click_button 'Save changes' end @@ -673,6 +661,18 @@ RSpec.describe 'Admin updates settings' do expect(current_settings.issues_create_limit).to eq(0) end + it 'changes Pipelines rate limits settings' do + visit network_admin_application_settings_path + + page.within('.as-pipeline-limits') do + fill_in 'Maximum number of requests per minute', with: 10 + click_button 'Save changes' + end + + expect(page).to have_content "Application settings saved successfully" + expect(current_settings.pipeline_limit_per_project_user_sha).to eq(10) + end + it 'changes Users API rate limits settings' do visit network_admin_application_settings_path @@ -856,10 +856,9 @@ RSpec.describe 'Admin updates settings' do stub_database_flavor_check end - context 'when service data cached', :clean_gitlab_redis_cache do + context 'when service data cached', :use_clean_rails_memory_store_caching do before do - allow(Rails.cache).to receive(:exist?).with('usage_data').and_return(true) - + visit usage_data_admin_application_settings_path visit service_usage_data_admin_application_settings_path end |