diff options
Diffstat (limited to 'spec')
88 files changed, 136 insertions, 97 deletions
diff --git a/spec/config/settings_spec.rb b/spec/config/settings_spec.rb index 0928f2b72ff..d344a0e28e6 100644 --- a/spec/config/settings_spec.rb +++ b/spec/config/settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Settings, feature_category: :authentication_and_authorization do +RSpec.describe Settings, feature_category: :system_access do using RSpec::Parameterized::TableSyntax describe 'omniauth' do diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 32ac0f8dc07..253f66579f3 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -400,7 +400,7 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set end end - describe 'PUT #reset_registration_token', feature_category: :credential_management do + describe 'PUT #reset_registration_token', feature_category: :user_management do before do sign_in(admin) end diff --git a/spec/controllers/profiles/two_factor_auths_controller_spec.rb b/spec/controllers/profiles/two_factor_auths_controller_spec.rb index 7d7cdededdb..dde0af3c543 100644 --- a/spec/controllers/profiles/two_factor_auths_controller_spec.rb +++ b/spec/controllers/profiles/two_factor_auths_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Profiles::TwoFactorAuthsController, feature_category: :authentication_and_authorization do +RSpec.describe Profiles::TwoFactorAuthsController, feature_category: :system_access do before do # `user` should be defined within the action-specific describe blocks sign_in(user) diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb index a5c00d24e30..2075dd3e7a7 100644 --- a/spec/controllers/projects/group_links_controller_spec.rb +++ b/spec/controllers/projects/group_links_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Projects::GroupLinksController, feature_category: :authentication_and_authorization do +RSpec.describe Projects::GroupLinksController, feature_category: :system_access do let_it_be(:group) { create(:group, :private) } let_it_be(:group2) { create(:group, :private) } let_it_be(:project) { create(:project, :private, group: group2) } diff --git a/spec/controllers/registrations/welcome_controller_spec.rb b/spec/controllers/registrations/welcome_controller_spec.rb index b5416d226e1..af7891a17cb 100644 --- a/spec/controllers/registrations/welcome_controller_spec.rb +++ b/spec/controllers/registrations/welcome_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Registrations::WelcomeController, feature_category: :authentication_and_authorization do +RSpec.describe Registrations::WelcomeController, feature_category: :system_access do let(:user) { create(:user) } describe '#welcome' do diff --git a/spec/features/admin/admin_deploy_keys_spec.rb b/spec/features/admin/admin_deploy_keys_spec.rb index e55e1cce6b9..f59b4db5cc2 100644 --- a/spec/features/admin/admin_deploy_keys_spec.rb +++ b/spec/features/admin/admin_deploy_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'admin deploy keys', :js, feature_category: :authentication_and_authorization do +RSpec.describe 'admin deploy keys', :js, feature_category: :system_access do include Spec::Support::Helpers::ModalHelpers let_it_be(:admin) { create(:admin) } diff --git a/spec/features/admin/admin_mode/login_spec.rb b/spec/features/admin/admin_mode/login_spec.rb index 533fcb9ba46..853e4763872 100644 --- a/spec/features/admin/admin_mode/login_spec.rb +++ b/spec/features/admin/admin_mode/login_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Admin Mode Login', feature_category: :authentication_and_authorization do +RSpec.describe 'Admin Mode Login', feature_category: :system_access do include TermsHelper include UserLoginHelper include LdapHelpers diff --git a/spec/features/admin/admin_mode/logout_spec.rb b/spec/features/admin/admin_mode/logout_spec.rb index f4e8941d25a..25f77da4401 100644 --- a/spec/features/admin/admin_mode/logout_spec.rb +++ b/spec/features/admin/admin_mode/logout_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Admin Mode Logout', :js, feature_category: :authentication_and_authorization do +RSpec.describe 'Admin Mode Logout', :js, feature_category: :system_access do include TermsHelper include UserLoginHelper include Spec::Support::Helpers::Features::TopNavSpecHelpers diff --git a/spec/features/admin/admin_mode/workers_spec.rb b/spec/features/admin/admin_mode/workers_spec.rb index f3639fd0800..305927663e9 100644 --- a/spec/features/admin/admin_mode/workers_spec.rb +++ b/spec/features/admin/admin_mode/workers_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # Test an operation that triggers background jobs requiring administrative rights -RSpec.describe 'Admin mode for workers', :request_store, feature_category: :authentication_and_authorization do +RSpec.describe 'Admin mode for workers', :request_store, feature_category: :system_access do include Spec::Support::Helpers::Features::AdminUsersHelpers let(:user) { create(:user) } diff --git a/spec/features/admin/admin_users_impersonation_tokens_spec.rb b/spec/features/admin/admin_users_impersonation_tokens_spec.rb index 5e6cc206883..342e23d0cab 100644 --- a/spec/features/admin/admin_users_impersonation_tokens_spec.rb +++ b/spec/features/admin/admin_users_impersonation_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Admin > Users > Impersonation Tokens', :js, feature_category: :authentication_and_authorization do +RSpec.describe 'Admin > Users > Impersonation Tokens', :js, feature_category: :system_access do include Spec::Support::Helpers::ModalHelpers include Spec::Support::Helpers::AccessTokenHelpers diff --git a/spec/features/callouts/registration_enabled_spec.rb b/spec/features/callouts/registration_enabled_spec.rb index 15c900592a1..3282a40854d 100644 --- a/spec/features/callouts/registration_enabled_spec.rb +++ b/spec/features/callouts/registration_enabled_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Registration enabled callout', feature_category: :authentication_and_authorization do +RSpec.describe 'Registration enabled callout', feature_category: :system_access do let_it_be(:admin) { create(:admin) } let_it_be(:non_admin) { create(:user) } let_it_be(:project) { create(:project) } diff --git a/spec/features/groups/settings/access_tokens_spec.rb b/spec/features/groups/settings/access_tokens_spec.rb index 1bee3be1ddb..cb92f9abdf5 100644 --- a/spec/features/groups/settings/access_tokens_spec.rb +++ b/spec/features/groups/settings/access_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Group > Settings > Access Tokens', :js, feature_category: :authentication_and_authorization do +RSpec.describe 'Group > Settings > Access Tokens', :js, feature_category: :system_access do include Spec::Support::Helpers::ModalHelpers let_it_be(:user) { create(:user) } diff --git a/spec/features/projects/settings/access_tokens_spec.rb b/spec/features/projects/settings/access_tokens_spec.rb index 12e14f5193f..a38c10c6bab 100644 --- a/spec/features/projects/settings/access_tokens_spec.rb +++ b/spec/features/projects/settings/access_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Project > Settings > Access Tokens', :js, feature_category: :credential_management do +RSpec.describe 'Project > Settings > Access Tokens', :js, feature_category: :user_management do include Spec::Support::Helpers::ModalHelpers let_it_be(:user) { create(:user) } diff --git a/spec/features/security/admin_access_spec.rb b/spec/features/security/admin_access_spec.rb index de81444ed71..d162b24175f 100644 --- a/spec/features/security/admin_access_spec.rb +++ b/spec/features/security/admin_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Admin::Projects", feature_category: :permissions do +RSpec.describe "Admin::Projects", feature_category: :system_access do include AccessMatchers describe "GET /admin/projects" do diff --git a/spec/features/security/dashboard_access_spec.rb b/spec/features/security/dashboard_access_spec.rb index 948a4567624..0d60f1b1d11 100644 --- a/spec/features/security/dashboard_access_spec.rb +++ b/spec/features/security/dashboard_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Dashboard access", feature_category: :permissions do +RSpec.describe "Dashboard access", feature_category: :system_access do include AccessMatchers describe "GET /dashboard" do diff --git a/spec/features/security/group/internal_access_spec.rb b/spec/features/security/group/internal_access_spec.rb index ad2df4a1882..49f81600ac2 100644 --- a/spec/features/security/group/internal_access_spec.rb +++ b/spec/features/security/group/internal_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Internal Group access', feature_category: :permissions do +RSpec.describe 'Internal Group access', feature_category: :system_access do include AccessMatchers let(:group) { create(:group, :internal) } diff --git a/spec/features/security/group/private_access_spec.rb b/spec/features/security/group/private_access_spec.rb index 2e7b7512b45..5206667427e 100644 --- a/spec/features/security/group/private_access_spec.rb +++ b/spec/features/security/group/private_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Private Group access', feature_category: :permissions do +RSpec.describe 'Private Group access', feature_category: :system_access do include AccessMatchers let(:group) { create(:group, :private) } diff --git a/spec/features/security/group/public_access_spec.rb b/spec/features/security/group/public_access_spec.rb index 513c5710c8f..5c5580908aa 100644 --- a/spec/features/security/group/public_access_spec.rb +++ b/spec/features/security/group/public_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Public Group access', feature_category: :permissions do +RSpec.describe 'Public Group access', feature_category: :system_access do include AccessMatchers let(:group) { create(:group, :public) } diff --git a/spec/features/security/project/internal_access_spec.rb b/spec/features/security/project/internal_access_spec.rb index e35e7ed742b..8ad4bedfdf8 100644 --- a/spec/features/security/project/internal_access_spec.rb +++ b/spec/features/security/project/internal_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Internal Project Access", feature_category: :permissions do +RSpec.describe "Internal Project Access", feature_category: :system_access do include AccessMatchers let_it_be(:project, reload: true) { create(:project, :internal, :repository, :with_namespace_settings) } diff --git a/spec/features/security/project/private_access_spec.rb b/spec/features/security/project/private_access_spec.rb index 59ddb18ae8a..d2d74ecf5c9 100644 --- a/spec/features/security/project/private_access_spec.rb +++ b/spec/features/security/project/private_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Private Project Access", feature_category: :permissions do +RSpec.describe "Private Project Access", feature_category: :system_access do include AccessMatchers let_it_be(:project, reload: true) do diff --git a/spec/features/security/project/public_access_spec.rb b/spec/features/security/project/public_access_spec.rb index 425691001f2..916f289b0b8 100644 --- a/spec/features/security/project/public_access_spec.rb +++ b/spec/features/security/project/public_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Public Project Access", feature_category: :permissions do +RSpec.describe "Public Project Access", feature_category: :system_access do include AccessMatchers let_it_be(:project, reload: true) do diff --git a/spec/features/security/project/snippet/internal_access_spec.rb b/spec/features/security/project/snippet/internal_access_spec.rb index b7dcc5f31d3..6ed0ec20210 100644 --- a/spec/features/security/project/snippet/internal_access_spec.rb +++ b/spec/features/security/project/snippet/internal_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Internal Project Snippets Access", feature_category: :permissions do +RSpec.describe "Internal Project Snippets Access", feature_category: :system_access do include AccessMatchers let_it_be(:project) { create(:project, :internal) } diff --git a/spec/features/security/project/snippet/private_access_spec.rb b/spec/features/security/project/snippet/private_access_spec.rb index 0ae45abb7ec..ef61f79a1b5 100644 --- a/spec/features/security/project/snippet/private_access_spec.rb +++ b/spec/features/security/project/snippet/private_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Private Project Snippets Access", feature_category: :permissions do +RSpec.describe "Private Project Snippets Access", feature_category: :system_access do include AccessMatchers let_it_be(:project) { create(:project, :private) } diff --git a/spec/features/security/project/snippet/public_access_spec.rb b/spec/features/security/project/snippet/public_access_spec.rb index b98f665c0dc..27fee745635 100644 --- a/spec/features/security/project/snippet/public_access_spec.rb +++ b/spec/features/security/project/snippet/public_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Public Project Snippets Access", feature_category: :permissions do +RSpec.describe "Public Project Snippets Access", feature_category: :system_access do include AccessMatchers let_it_be(:project) { create(:project, :public) } diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index 9ef0626b2b2..86af1970909 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js, -feature_category: :authentication_and_authorization do +feature_category: :system_access do include Spec::Support::Helpers::Features::TwoFactorHelpers before do diff --git a/spec/features/webauthn_spec.rb b/spec/features/webauthn_spec.rb index 859793d1353..093609e5610 100644 --- a/spec/features/webauthn_spec.rb +++ b/spec/features/webauthn_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_category: :authentication_and_authorization do +RSpec.describe 'Using WebAuthn Devices for Authentication', :js, feature_category: :system_access do include Spec::Support::Helpers::Features::TwoFactorHelpers let(:app_id) { "http://#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}" } diff --git a/spec/graphql/types/key_type_spec.rb b/spec/graphql/types/key_type_spec.rb index 78144076467..13c00d94b37 100644 --- a/spec/graphql/types/key_type_spec.rb +++ b/spec/graphql/types/key_type_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GitlabSchema.types['Key'], feature_category: :authentication_and_authorization do +RSpec.describe GitlabSchema.types['Key'], feature_category: :system_access do specify { expect(described_class.graphql_name).to eq('Key') } it 'contains attributes for SSH keys' do diff --git a/spec/lib/api/entities/ssh_key_spec.rb b/spec/lib/api/entities/ssh_key_spec.rb index b4310035a66..14561beedc5 100644 --- a/spec/lib/api/entities/ssh_key_spec.rb +++ b/spec/lib/api/entities/ssh_key_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Entities::SSHKey, feature_category: :authentication_and_authorization do +RSpec.describe API::Entities::SSHKey, feature_category: :system_access do describe '#as_json' do subject { entity.as_json } diff --git a/spec/lib/gitlab/api_authentication/token_resolver_spec.rb b/spec/lib/gitlab/api_authentication/token_resolver_spec.rb index c0c8e7aba63..48cae42dcd2 100644 --- a/spec/lib/gitlab/api_authentication/token_resolver_spec.rb +++ b/spec/lib/gitlab/api_authentication/token_resolver_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::APIAuthentication::TokenResolver, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::APIAuthentication::TokenResolver, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public) } let_it_be(:personal_access_token) { create(:personal_access_token, user: user) } diff --git a/spec/lib/gitlab/app_logger_spec.rb b/spec/lib/gitlab/app_logger_spec.rb index 85ca60d539f..e3415f4ad8c 100644 --- a/spec/lib/gitlab/app_logger_spec.rb +++ b/spec/lib/gitlab/app_logger_spec.rb @@ -5,22 +5,27 @@ require 'spec_helper' RSpec.describe Gitlab::AppLogger do subject { described_class } - it 'builds two Logger instances' do - expect(Gitlab::Logger).to receive(:new).and_call_original - expect(Gitlab::JsonLogger).to receive(:new).and_call_original + context 'when UNSTRUCTURED_RAILS_LOG is enabled' do + before do + stub_env('UNSTRUCTURED_RAILS_LOG', 'true') + end - subject.info('Hello World!') - end + it 'builds two Logger instances' do + expect(Gitlab::Logger).to receive(:new).and_call_original + expect(Gitlab::JsonLogger).to receive(:new).and_call_original - it 'logs info to AppLogger and AppJsonLogger' do - expect_any_instance_of(Gitlab::AppTextLogger).to receive(:info).and_call_original - expect_any_instance_of(Gitlab::AppJsonLogger).to receive(:info).and_call_original + subject.info('Hello World!') + end - subject.info('Hello World!') + it 'logs info to AppLogger and AppJsonLogger' do + expect_any_instance_of(Gitlab::AppTextLogger).to receive(:info).and_call_original + expect_any_instance_of(Gitlab::AppJsonLogger).to receive(:info).and_call_original + + subject.info('Hello World!') + end end it 'logs info to only the AppJsonLogger when unstructured logs are disabled' do - stub_env('UNSTRUCTURED_RAILS_LOG', 'false') expect_any_instance_of(Gitlab::AppTextLogger).not_to receive(:info).and_call_original expect_any_instance_of(Gitlab::AppJsonLogger).to receive(:info).and_call_original diff --git a/spec/lib/gitlab/auth/auth_finders_spec.rb b/spec/lib/gitlab/auth/auth_finders_spec.rb index 6aedd0a0a23..ecc5c688228 100644 --- a/spec/lib/gitlab/auth/auth_finders_spec.rb +++ b/spec/lib/gitlab/auth/auth_finders_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Auth::AuthFinders, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::Auth::AuthFinders, feature_category: :system_access do include described_class include HttpBasicAuthHelpers diff --git a/spec/lib/gitlab/auth/o_auth/user_spec.rb b/spec/lib/gitlab/auth/o_auth/user_spec.rb index 04fbbff3559..8a86b306604 100644 --- a/spec/lib/gitlab/auth/o_auth/user_spec.rb +++ b/spec/lib/gitlab/auth/o_auth/user_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Auth::OAuth::User, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::Auth::OAuth::User, feature_category: :system_access do include LdapHelpers let(:oauth_user) { described_class.new(auth_hash) } diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index a5f46aa1f35..11e9ecdb878 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::Auth, :use_clean_rails_memory_store_caching, feature_category: :system_access do let_it_be(:project) { create(:project) } let(:auth_failure) { { actor: nil, project: nil, type: nil, authentication_abilities: nil } } diff --git a/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb b/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb index 7075d4694ae..d2da6867773 100644 --- a/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb +++ b/spec/lib/gitlab/background_migration/backfill_admin_mode_scope_for_personal_access_tokens_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::BackfillAdminModeScopeForPersonalAccessTokens, - :migration, schema: 20221228103133, feature_category: :authentication_and_authorization do + :migration, schema: 20221228103133, feature_category: :system_access do let(:users) { table(:users) } let(:personal_access_tokens) { table(:personal_access_tokens) } diff --git a/spec/lib/gitlab/database/schema_validation/runner_spec.rb b/spec/lib/gitlab/database/schema_validation/runner_spec.rb index 6c491ae56f7..e07deec3062 100644 --- a/spec/lib/gitlab/database/schema_validation/runner_spec.rb +++ b/spec/lib/gitlab/database/schema_validation/runner_spec.rb @@ -15,5 +15,36 @@ RSpec.describe Gitlab::Database::SchemaValidation::Runner, feature_category: :da it 'returns inconsistencies' do expect(inconsistencies).not_to be_empty end + + it 'execute all validators' do + all_validators = Gitlab::Database::SchemaValidation::Validators::BaseValidator.all_validators + + expect(all_validators).to all(receive(:new).with(structure_sql, database).and_call_original) + + inconsistencies + end + + context 'when validators are passed' do + subject(:inconsistencies) { described_class.new(structure_sql, database, validators: validators).execute } + + let(:class_name) { 'Gitlab::Database::SchemaValidation::Validators::ExtraIndexes' } + let(:inconsistency_class_name) { 'Gitlab::Database::SchemaValidation::Validators::BaseValidator::Inconsistency' } + + let(:extra_indexes) { class_double(class_name) } + let(:instace_extra_index) { instance_double(class_name, execute: [inconsistency]) } + let(:inconsistency) { instance_double(inconsistency_class_name, name: 'test') } + + let(:validators) { [extra_indexes] } + + it 'only execute the validators passed' do + expect(extra_indexes).to receive(:new).with(structure_sql, database).and_return(instace_extra_index) + + Gitlab::Database::SchemaValidation::Validators::BaseValidator.all_validators.each do |validator| + expect(validator).not_to receive(:new).with(structure_sql, database) + end + + expect(inconsistencies.map(&:name)).to eql ['test'] + end + end end end diff --git a/spec/lib/gitlab/etag_caching/middleware_spec.rb b/spec/lib/gitlab/etag_caching/middleware_spec.rb index fa0b3d1c6dd..d25511843ff 100644 --- a/spec/lib/gitlab/etag_caching/middleware_spec.rb +++ b/spec/lib/gitlab/etag_caching/middleware_spec.rb @@ -145,8 +145,11 @@ RSpec.describe Gitlab::EtagCaching::Middleware, :clean_gitlab_redis_shared_state expect(payload[:headers].env['HTTP_IF_NONE_MATCH']).to eq('W/"123"') end - it 'log subscriber processes action' do - expect_any_instance_of(ActionController::LogSubscriber).to receive(:process_action) + it "publishes process_action.action_controller event to be picked up by lograge's subscriber" do + # Lograge unhooks the default Rails subscriber (ActionController::LogSubscriber) + # and replaces with its own (Lograge::LogSubscribers::ActionController). + # When `lograge.keep_original_rails_log = true`, ActionController::LogSubscriber is kept. + expect_any_instance_of(Lograge::LogSubscribers::ActionController).to receive(:process_action) .with(instance_of(ActiveSupport::Notifications::Event)) .and_call_original diff --git a/spec/lib/gitlab/external_authorization/config_spec.rb b/spec/lib/gitlab/external_authorization/config_spec.rb index 4231b0d3747..f1daa9249f4 100644 --- a/spec/lib/gitlab/external_authorization/config_spec.rb +++ b/spec/lib/gitlab/external_authorization/config_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::ExternalAuthorization::Config, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::ExternalAuthorization::Config, feature_category: :system_access do it 'allows deploy tokens and keys when external authorization is disabled' do stub_application_setting(external_authorization_service_enabled: false) expect(described_class.allow_deploy_tokens_and_deploy_keys?).to be_eql(true) diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index ea2c239df07..13e9aeb4c53 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Gitlab::GitAccess, :aggregate_failures, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::GitAccess, :aggregate_failures, feature_category: :system_access do include TermsHelper include AdminModeHelper include ExternalAuthorizationServiceHelpers diff --git a/spec/lib/gitlab/safe_device_detector_spec.rb b/spec/lib/gitlab/safe_device_detector_spec.rb index c37dc1e1c7e..56ba084c435 100644 --- a/spec/lib/gitlab/safe_device_detector_spec.rb +++ b/spec/lib/gitlab/safe_device_detector_spec.rb @@ -4,7 +4,7 @@ require 'fast_spec_helper' require 'device_detector' require_relative '../../../lib/gitlab/safe_device_detector' -RSpec.describe Gitlab::SafeDeviceDetector, feature_category: :authentication_and_authorization do +RSpec.describe Gitlab::SafeDeviceDetector, feature_category: :system_access do it 'retains the behavior for normal user agents' do chrome_user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 \ (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36" diff --git a/spec/lib/security/weak_passwords_spec.rb b/spec/lib/security/weak_passwords_spec.rb index afa9448e746..14bab5ee6ec 100644 --- a/spec/lib/security/weak_passwords_spec.rb +++ b/spec/lib/security/weak_passwords_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Security::WeakPasswords, feature_category: :authentication_and_authorization do +RSpec.describe Security::WeakPasswords, feature_category: :system_access do describe "#weak_for_user?" do using RSpec::Parameterized::TableSyntax diff --git a/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb b/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb index bfe2b661a31..ede9c5ea7e8 100644 --- a/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb +++ b/spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_migration! -RSpec.describe MigrateRemainingU2fRegistrations, :migration, feature_category: :authentication_and_authorization do +RSpec.describe MigrateRemainingU2fRegistrations, :migration, feature_category: :system_access do let(:u2f_registrations) { table(:u2f_registrations) } let(:webauthn_registrations) { table(:webauthn_registrations) } let(:users) { table(:users) } diff --git a/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb b/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb index 735232dfac7..b03849b61a2 100644 --- a/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb +++ b/spec/migrations/20220513043344_reschedule_expire_o_auth_tokens_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_migration! -RSpec.describe RescheduleExpireOAuthTokens, feature_category: :authentication_and_authorization do +RSpec.describe RescheduleExpireOAuthTokens, feature_category: :system_access do let!(:migration) { described_class::MIGRATION } describe '#up' do diff --git a/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb b/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb index 1b8ec47f61b..2eff65d5873 100644 --- a/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb +++ b/spec/migrations/20220601152916_add_user_id_and_ip_address_success_index_to_authentication_events_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_migration! RSpec.describe AddUserIdAndIpAddressSuccessIndexToAuthenticationEvents, -feature_category: :authentication_and_authorization do +feature_category: :system_access do let(:db) { described_class.new } let(:old_index) { described_class::OLD_INDEX_NAME } let(:new_index) { described_class::NEW_INDEX_NAME } diff --git a/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb b/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb index 19cf3b2fb69..7b0df403e30 100644 --- a/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb +++ b/spec/migrations/20220921144258_remove_orphan_group_token_users_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' require_migration! RSpec.describe RemoveOrphanGroupTokenUsers, :migration, :sidekiq_inline, -feature_category: :authentication_and_authorization do +feature_category: :system_access do subject(:migration) { described_class.new } let(:users) { table(:users) } diff --git a/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb b/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb index da6532a822a..e5890ffce17 100644 --- a/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb +++ b/spec/migrations/20221209235940_cleanup_o_auth_access_tokens_with_null_expires_in_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_migration! -RSpec.describe CleanupOAuthAccessTokensWithNullExpiresIn, feature_category: :authentication_and_authorization do +RSpec.describe CleanupOAuthAccessTokensWithNullExpiresIn, feature_category: :system_access do let(:batched_migration) { described_class::MIGRATION } it 'schedules background jobs for each batch of oauth_access_tokens' do diff --git a/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb b/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb index 5029a861d31..83b47da3065 100644 --- a/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb +++ b/spec/migrations/backfill_integrations_enable_ssl_verification_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require_migration! -RSpec.describe BackfillIntegrationsEnableSslVerification, feature_category: :authentication_and_authorization do +RSpec.describe BackfillIntegrationsEnableSslVerification, feature_category: :system_access do let!(:migration) { described_class::MIGRATION } let!(:integrations) { described_class::Integration } diff --git a/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb b/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb index 7aaa90ee985..5854dcd3cb0 100644 --- a/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb +++ b/spec/migrations/cleanup_backfill_integrations_enable_ssl_verification_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_migration! RSpec.describe CleanupBackfillIntegrationsEnableSslVerification, :migration, -feature_category: :authentication_and_authorization do +feature_category: :system_access do let(:job_class_name) { 'BackfillIntegrationsEnableSslVerification' } before do diff --git a/spec/migrations/queue_backfill_admin_mode_scope_for_personal_access_tokens_spec.rb b/spec/migrations/queue_backfill_admin_mode_scope_for_personal_access_tokens_spec.rb index 8209f317550..068da23113d 100644 --- a/spec/migrations/queue_backfill_admin_mode_scope_for_personal_access_tokens_spec.rb +++ b/spec/migrations/queue_backfill_admin_mode_scope_for_personal_access_tokens_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_migration! RSpec.describe QueueBackfillAdminModeScopeForPersonalAccessTokens, - feature_category: :authentication_and_authorization do + feature_category: :system_access do describe '#up' do it 'schedules background migration' do migrate! diff --git a/spec/migrations/update_application_settings_protected_paths_spec.rb b/spec/migrations/update_application_settings_protected_paths_spec.rb index d61eadf9f9c..055955c56f1 100644 --- a/spec/migrations/update_application_settings_protected_paths_spec.rb +++ b/spec/migrations/update_application_settings_protected_paths_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require_migration! RSpec.describe UpdateApplicationSettingsProtectedPaths, :aggregate_failures, -feature_category: :authentication_and_authorization do +feature_category: :system_access do subject(:migration) { described_class.new } let!(:application_settings) { table(:application_settings) } diff --git a/spec/models/concerns/has_user_type_spec.rb b/spec/models/concerns/has_user_type_spec.rb index 0f90bbcda4e..87dacc71ca3 100644 --- a/spec/models/concerns/has_user_type_spec.rb +++ b/spec/models/concerns/has_user_type_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe User, feature_category: :authentication_and_authorization do +RSpec.describe User, feature_category: :system_access do specify 'types consistency checks', :aggregate_failures do expect(described_class::USER_TYPES.keys) .to match_array(%w[human ghost alert_bot project_bot support_bot service_user security_bot visual_review_bot diff --git a/spec/models/members/member_role_spec.rb b/spec/models/members/member_role_spec.rb index 4bf33eb1fce..1ee86376e02 100644 --- a/spec/models/members/member_role_spec.rb +++ b/spec/models/members/member_role_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe MemberRole, feature_category: :authentication_and_authorization do +RSpec.describe MemberRole, feature_category: :system_access do describe 'associations' do it { is_expected.to belong_to(:namespace) } it { is_expected.to have_many(:members) } diff --git a/spec/models/personal_access_token_spec.rb b/spec/models/personal_access_token_spec.rb index 2320ff669d0..eb10d546f76 100644 --- a/spec/models/personal_access_token_spec.rb +++ b/spec/models/personal_access_token_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe PersonalAccessToken, feature_category: :authentication_and_authorization do +RSpec.describe PersonalAccessToken, feature_category: :system_access do subject { described_class } describe '.build' do diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index f76b5dd8224..e9980657634 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe GroupPolicy, feature_category: :authentication_and_authorization do +RSpec.describe GroupPolicy, feature_category: :system_access do include AdminModeHelper include_context 'GroupPolicy context' diff --git a/spec/policies/project_group_link_policy_spec.rb b/spec/policies/project_group_link_policy_spec.rb index 7c8a4619e47..9461f33decb 100644 --- a/spec/policies/project_group_link_policy_spec.rb +++ b/spec/policies/project_group_link_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe ProjectGroupLinkPolicy, feature_category: :authentication_and_authorization do +RSpec.describe ProjectGroupLinkPolicy, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group, :private) } let_it_be(:group2) { create(:group, :private) } diff --git a/spec/policies/project_policy_spec.rb b/spec/policies/project_policy_spec.rb index b2fb310aca3..67adcae1dd9 100644 --- a/spec/policies/project_policy_spec.rb +++ b/spec/policies/project_policy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe ProjectPolicy, feature_category: :authentication_and_authorization do +RSpec.describe ProjectPolicy, feature_category: :system_access do include ExternalAuthorizationServiceHelpers include AdminModeHelper include_context 'ProjectPolicy context' diff --git a/spec/requests/admin/applications_controller_spec.rb b/spec/requests/admin/applications_controller_spec.rb index c83137ebbce..367697b1289 100644 --- a/spec/requests/admin/applications_controller_spec.rb +++ b/spec/requests/admin/applications_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Admin::ApplicationsController, :enable_admin_mode, -feature_category: :authentication_and_authorization do +feature_category: :system_access do let_it_be(:admin) { create(:admin) } let_it_be(:application) { create(:oauth_application, owner_id: nil, owner_type: nil) } let_it_be(:show_path) { admin_application_path(application) } diff --git a/spec/requests/admin/impersonation_tokens_controller_spec.rb b/spec/requests/admin/impersonation_tokens_controller_spec.rb index 15212db0e77..11fc5d94292 100644 --- a/spec/requests/admin/impersonation_tokens_controller_spec.rb +++ b/spec/requests/admin/impersonation_tokens_controller_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe Admin::ImpersonationTokensController, :enable_admin_mode, -feature_category: :authentication_and_authorization do +feature_category: :system_access do let(:admin) { create(:admin) } let!(:user) { create(:user) } diff --git a/spec/requests/api/access_requests_spec.rb b/spec/requests/api/access_requests_spec.rb index 8c14ead9e42..45d1594c734 100644 --- a/spec/requests/api/access_requests_spec.rb +++ b/spec/requests/api/access_requests_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::AccessRequests, feature_category: :authentication_and_authorization do +RSpec.describe API::AccessRequests, feature_category: :system_access do let_it_be(:maintainer) { create(:user) } let_it_be(:developer) { create(:user) } let_it_be(:access_requester) { create(:user) } diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb index 35851fff6c8..d5ad0779bd9 100644 --- a/spec/requests/api/api_spec.rb +++ b/spec/requests/api/api_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::API, feature_category: :authentication_and_authorization do +RSpec.describe API::API, feature_category: :system_access do include GroupAPIHelpers describe 'Record user last activity in after hook' do diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb index 0f7df6661a9..933be87d680 100644 --- a/spec/requests/api/applications_spec.rb +++ b/spec/requests/api/applications_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Applications, :api, feature_category: :authentication_and_authorization do +RSpec.describe API::Applications, :api, feature_category: :system_access do let_it_be(:admin) { create(:admin) } let_it_be(:user) { create(:user) } let_it_be(:scopes) { 'api' } diff --git a/spec/requests/api/doorkeeper_access_spec.rb b/spec/requests/api/doorkeeper_access_spec.rb index 5116f074894..888220c2251 100644 --- a/spec/requests/api/doorkeeper_access_spec.rb +++ b/spec/requests/api/doorkeeper_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'doorkeeper access', feature_category: :authentication_and_authorization do +RSpec.describe 'doorkeeper access', feature_category: :system_access do let!(:user) { create(:user) } let!(:application) { Doorkeeper::Application.create!(name: "MyApp", redirect_uri: "https://app.com", owner: user) } let!(:token) { Doorkeeper::AccessToken.create! application_id: application.id, resource_owner_id: user.id, scopes: "api" } diff --git a/spec/requests/api/graphql/current_user_query_spec.rb b/spec/requests/api/graphql/current_user_query_spec.rb index 53d2580caee..aceef77920d 100644 --- a/spec/requests/api/graphql/current_user_query_spec.rb +++ b/spec/requests/api/graphql/current_user_query_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'getting project information', feature_category: :authentication_and_authorization do +RSpec.describe 'getting project information', feature_category: :system_access do include GraphqlHelpers let(:fields) do diff --git a/spec/requests/api/graphql/project/base_service_spec.rb b/spec/requests/api/graphql/project/base_service_spec.rb index 7b1b95eaf58..b27cddea07b 100644 --- a/spec/requests/api/graphql/project/base_service_spec.rb +++ b/spec/requests/api/graphql/project/base_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'query Jira service', feature_category: :authentication_and_authorization do +RSpec.describe 'query Jira service', feature_category: :system_access do include GraphqlHelpers let_it_be(:current_user) { create(:user) } diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb index 38275ce0057..0be9df41e8f 100644 --- a/spec/requests/api/helpers_spec.rb +++ b/spec/requests/api/helpers_spec.rb @@ -4,7 +4,7 @@ require 'spec_helper' require 'raven/transports/dummy' require_relative '../../../config/initializers/sentry' -RSpec.describe API::Helpers, :enable_admin_mode, feature_category: :authentication_and_authorization do +RSpec.describe API::Helpers, :enable_admin_mode, feature_category: :system_access do include API::APIGuard::HelperMethods include described_class include TermsHelper diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index ca32271f573..c1f256a5d28 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::Base, feature_category: :authentication_and_authorization do +RSpec.describe API::Internal::Base, feature_category: :system_access do include GitlabShellHelpers include APIInternalBaseHelpers diff --git a/spec/requests/api/keys_spec.rb b/spec/requests/api/keys_spec.rb index d9a0f061156..0ca1a7d030f 100644 --- a/spec/requests/api/keys_spec.rb +++ b/spec/requests/api/keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Keys, feature_category: :authentication_and_authorization do +RSpec.describe API::Keys, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } let_it_be(:email) { create(:email, user: user) } diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb index b29f1e9e661..2d3215543d2 100644 --- a/spec/requests/api/oauth_tokens_spec.rb +++ b/spec/requests/api/oauth_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'OAuth tokens', feature_category: :authentication_and_authorization do +RSpec.describe 'OAuth tokens', feature_category: :system_access do include HttpBasicAuthHelpers context 'Resource Owner Password Credentials' do diff --git a/spec/requests/api/personal_access_tokens/self_information_spec.rb b/spec/requests/api/personal_access_tokens/self_information_spec.rb index 4a3c0ad8904..2a7af350054 100644 --- a/spec/requests/api/personal_access_tokens/self_information_spec.rb +++ b/spec/requests/api/personal_access_tokens/self_information_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::PersonalAccessTokens::SelfInformation, feature_category: :authentication_and_authorization do +RSpec.describe API::PersonalAccessTokens::SelfInformation, feature_category: :system_access do let(:path) { '/personal_access_tokens/self' } let(:token) { create(:personal_access_token, user: current_user) } diff --git a/spec/requests/api/personal_access_tokens_spec.rb b/spec/requests/api/personal_access_tokens_spec.rb index 32adc7ebd61..cca94c7a012 100644 --- a/spec/requests/api/personal_access_tokens_spec.rb +++ b/spec/requests/api/personal_access_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::PersonalAccessTokens, feature_category: :authentication_and_authorization do +RSpec.describe API::PersonalAccessTokens, feature_category: :system_access do let_it_be(:path) { '/personal_access_tokens' } describe 'GET /personal_access_tokens' do diff --git a/spec/requests/api/resource_access_tokens_spec.rb b/spec/requests/api/resource_access_tokens_spec.rb index 6a89e9a56df..9277fa18219 100644 --- a/spec/requests/api/resource_access_tokens_spec.rb +++ b/spec/requests/api/resource_access_tokens_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe API::ResourceAccessTokens, feature_category: :authentication_and_authorization do +RSpec.describe API::ResourceAccessTokens, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:user_non_priviledged) { create(:user) } diff --git a/spec/requests/dashboard_controller_spec.rb b/spec/requests/dashboard_controller_spec.rb index 1c8ab843ebe..d7f01b8a7ab 100644 --- a/spec/requests/dashboard_controller_spec.rb +++ b/spec/requests/dashboard_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe DashboardController, feature_category: :authentication_and_authorization do +RSpec.describe DashboardController, feature_category: :system_access do context 'token authentication' do it_behaves_like 'authenticates sessionless user for the request spec', 'issues atom', public_resource: false do let(:url) { issues_dashboard_url(:atom, assignee_username: user.username) } diff --git a/spec/requests/groups/settings/access_tokens_controller_spec.rb b/spec/requests/groups/settings/access_tokens_controller_spec.rb index f26b69f8d30..0204af8ea8e 100644 --- a/spec/requests/groups/settings/access_tokens_controller_spec.rb +++ b/spec/requests/groups/settings/access_tokens_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Groups::Settings::AccessTokensController, feature_category: :authentication_and_authorization do +RSpec.describe Groups::Settings::AccessTokensController, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:resource) { create(:group) } let_it_be(:access_token_user) { create(:user, :project_bot) } diff --git a/spec/requests/groups/settings/applications_controller_spec.rb b/spec/requests/groups/settings/applications_controller_spec.rb index fb91cd8bdab..2fcf80658b2 100644 --- a/spec/requests/groups/settings/applications_controller_spec.rb +++ b/spec/requests/groups/settings/applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Groups::Settings::ApplicationsController, feature_category: :authentication_and_authorization do +RSpec.describe Groups::Settings::ApplicationsController, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:application) { create(:oauth_application, owner_id: group.id, owner_type: 'Namespace') } diff --git a/spec/requests/jwks_controller_spec.rb b/spec/requests/jwks_controller_spec.rb index ac9765c35d8..c6f5f7c6bea 100644 --- a/spec/requests/jwks_controller_spec.rb +++ b/spec/requests/jwks_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JwksController, feature_category: :authentication_and_authorization do +RSpec.describe JwksController, feature_category: :system_access do describe 'Endpoints from the parent Doorkeeper::OpenidConnect::DiscoveryController' do it 'respond successfully' do [ diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb index 00222cb1977..1b91c04b5d9 100644 --- a/spec/requests/jwt_controller_spec.rb +++ b/spec/requests/jwt_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe JwtController, feature_category: :authentication_and_authorization do +RSpec.describe JwtController, feature_category: :system_access do include_context 'parsed logs' let(:service) { double(execute: {} ) } diff --git a/spec/requests/oauth/applications_controller_spec.rb b/spec/requests/oauth/applications_controller_spec.rb index 94ee08f6272..8c2856b87d1 100644 --- a/spec/requests/oauth/applications_controller_spec.rb +++ b/spec/requests/oauth/applications_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Oauth::ApplicationsController, feature_category: :authentication_and_authorization do +RSpec.describe Oauth::ApplicationsController, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:application) { create(:oauth_application, owner: user) } let_it_be(:show_path) { oauth_application_path(application) } diff --git a/spec/requests/oauth/authorizations_controller_spec.rb b/spec/requests/oauth/authorizations_controller_spec.rb index 52188717210..257f238d9ef 100644 --- a/spec/requests/oauth/authorizations_controller_spec.rb +++ b/spec/requests/oauth/authorizations_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Oauth::AuthorizationsController, feature_category: :authentication_and_authorization do +RSpec.describe Oauth::AuthorizationsController, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:application) { create(:oauth_application, redirect_uri: 'custom://test') } let_it_be(:oauth_authorization_path) do diff --git a/spec/requests/oauth/tokens_controller_spec.rb b/spec/requests/oauth/tokens_controller_spec.rb index cdfad8cb59c..58203a81bac 100644 --- a/spec/requests/oauth/tokens_controller_spec.rb +++ b/spec/requests/oauth/tokens_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Oauth::TokensController, feature_category: :authentication_and_authorization do +RSpec.describe Oauth::TokensController, feature_category: :system_access do let(:cors_request_headers) { { 'Origin' => 'http://notgitlab.com' } } let(:other_headers) { {} } let(:headers) { cors_request_headers.merge(other_headers) } diff --git a/spec/requests/oauth_tokens_spec.rb b/spec/requests/oauth_tokens_spec.rb index 053bd317fcc..67c676fdb40 100644 --- a/spec/requests/oauth_tokens_spec.rb +++ b/spec/requests/oauth_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'OAuth Tokens requests', feature_category: :authentication_and_authorization do +RSpec.describe 'OAuth Tokens requests', feature_category: :system_access do let(:user) { create :user } let(:application) { create :oauth_application, scopes: 'api' } let(:grant_type) { 'authorization_code' } diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb index 9035e723abe..2e158190734 100644 --- a/spec/requests/openid_connect_spec.rb +++ b/spec/requests/openid_connect_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'OpenID Connect requests', feature_category: :authentication_and_authorization do +RSpec.describe 'OpenID Connect requests', feature_category: :system_access do let(:user) do create( :user, diff --git a/spec/requests/projects/settings/access_tokens_controller_spec.rb b/spec/requests/projects/settings/access_tokens_controller_spec.rb index defb35fd496..666dc42bcab 100644 --- a/spec/requests/projects/settings/access_tokens_controller_spec.rb +++ b/spec/requests/projects/settings/access_tokens_controller_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Projects::Settings::AccessTokensController, feature_category: :authentication_and_authorization do +RSpec.describe Projects::Settings::AccessTokensController, feature_category: :system_access do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:resource) { create(:project, group: group) } diff --git a/spec/requests/rack_attack_global_spec.rb b/spec/requests/rack_attack_global_spec.rb index 91595f7826a..0dd8a15c3a4 100644 --- a/spec/requests/rack_attack_global_spec.rb +++ b/spec/requests/rack_attack_global_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'Rack Attack global throttles', :use_clean_rails_memory_store_caching, -feature_category: :authentication_and_authorization do +feature_category: :system_access do include RackAttackSpecHelpers include SessionHelpers diff --git a/spec/requests/sessions_spec.rb b/spec/requests/sessions_spec.rb index 7b3fd23980a..bc4ac3b7335 100644 --- a/spec/requests/sessions_spec.rb +++ b/spec/requests/sessions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Sessions', feature_category: :authentication_and_authorization do +RSpec.describe 'Sessions', feature_category: :system_access do context 'authentication', :allow_forgery_protection do let(:user) { create(:user) } diff --git a/spec/routing/user_routing_spec.rb b/spec/routing/user_routing_spec.rb index 7bb589565fa..b155560c9f0 100644 --- a/spec/routing/user_routing_spec.rb +++ b/spec/routing/user_routing_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'user routing', :clean_gitlab_redis_sessions, feature_category: :authentication_and_authorization do +RSpec.describe 'user routing', :clean_gitlab_redis_sessions, feature_category: :system_access do include SessionHelpers context 'when GitHub OAuth on project import is cancelled' do diff --git a/spec/services/user_project_access_changed_service_spec.rb b/spec/services/user_project_access_changed_service_spec.rb index 356675d55f2..563af8e7e9e 100644 --- a/spec/services/user_project_access_changed_service_spec.rb +++ b/spec/services/user_project_access_changed_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe UserProjectAccessChangedService, feature_category: :authentication_and_authorization do +RSpec.describe UserProjectAccessChangedService, feature_category: :system_access do describe '#execute' do it 'permits high-priority operation' do expect(AuthorizedProjectsWorker).to receive(:bulk_perform_async) diff --git a/spec/tasks/gitlab/security/update_banned_ssh_keys_rake_spec.rb b/spec/tasks/gitlab/security/update_banned_ssh_keys_rake_spec.rb index 25ea5d75a56..264dea815f4 100644 --- a/spec/tasks/gitlab/security/update_banned_ssh_keys_rake_spec.rb +++ b/spec/tasks/gitlab/security/update_banned_ssh_keys_rake_spec.rb @@ -7,7 +7,7 @@ require 'rake_helper' # is hit in the rake task. require 'git' -RSpec.describe 'gitlab:security namespace rake tasks', :silence_stdout, feature_category: :credential_management do +RSpec.describe 'gitlab:security namespace rake tasks', :silence_stdout, feature_category: :user_management do let(:fixture_path) { Rails.root.join('spec/fixtures/tasks/gitlab/security') } let(:output_file) { File.join(__dir__, 'tmp/banned_keys_test.yml') } let(:git_url) { 'https://github.com/rapid7/ssh-badkeys.git' } diff --git a/spec/views/devise/shared/_error_messages.html.haml_spec.rb b/spec/views/devise/shared/_error_messages.html.haml_spec.rb index afd3141f2c7..9f23b049caf 100644 --- a/spec/views/devise/shared/_error_messages.html.haml_spec.rb +++ b/spec/views/devise/shared/_error_messages.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'devise/shared/_error_messages', feature_category: :authentication_and_authorization do +RSpec.describe 'devise/shared/_error_messages', feature_category: :system_access do describe 'Error messages' do let(:resource) do instance_spy(User, errors: errors, class: User) diff --git a/spec/views/profiles/keys/_key.html.haml_spec.rb b/spec/views/profiles/keys/_key.html.haml_spec.rb index e4e626b237b..d51bfd19c37 100644 --- a/spec/views/profiles/keys/_key.html.haml_spec.rb +++ b/spec/views/profiles/keys/_key.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :authentication_and_authorization do +RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :system_access do let_it_be(:user) { create(:user) } before do |