diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-09 09:08:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-09 09:08:55 +0000 |
commit | 5fe2d74e00bacd9a78d43801a9ed19325597f7ae (patch) | |
tree | f9e9895c63f1bba4b1064079f998f9be6919aabf /spec | |
parent | eba9cac2e8181aaf1a08e1730f440155c765741e (diff) | |
download | gitlab-ce-5fe2d74e00bacd9a78d43801a9ed19325597f7ae.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
178 files changed, 252 insertions, 184 deletions
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb index 0ad0a111156..f4a87bdfc04 100644 --- a/spec/controllers/admin/application_settings_controller_spec.rb +++ b/spec/controllers/admin/application_settings_controller_spec.rb @@ -162,6 +162,13 @@ RSpec.describe Admin::ApplicationSettingsController, :do_not_mock_admin_mode_set expect(ApplicationSetting.current.receive_max_input_size).to eq(1024) end + it 'updates the default_preferred_language for string value' do + put :update, params: { application_setting: { default_preferred_language: 'zh_CN' } } + + expect(response).to redirect_to(general_admin_application_settings_path) + expect(ApplicationSetting.current.default_preferred_language).to eq('zh_CN') + end + it 'updates the default_project_creation for string value' do put :update, params: { application_setting: { default_project_creation: ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS } } diff --git a/spec/frontend/vue_shared/components/web_ide_link_spec.js b/spec/frontend/vue_shared/components/web_ide_link_spec.js index 596567e9d19..1421ddf85f4 100644 --- a/spec/frontend/vue_shared/components/web_ide_link_spec.js +++ b/spec/frontend/vue_shared/components/web_ide_link_spec.js @@ -3,12 +3,18 @@ import { nextTick } from 'vue'; import ActionsButton from '~/vue_shared/components/actions_button.vue'; import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; -import WebIdeLink, { i18n } from '~/vue_shared/components/web_ide_link.vue'; +import WebIdeLink, { + i18n, + PREFERRED_EDITOR_RESET_KEY, + PREFERRED_EDITOR_KEY, + KEY_WEB_IDE, +} from '~/vue_shared/components/web_ide_link.vue'; import ConfirmForkModal from '~/vue_shared/components/confirm_fork_modal.vue'; import UserCalloutDismisser from '~/vue_shared/components/user_callout_dismisser.vue'; import { stubComponent } from 'helpers/stub_component'; import { shallowMountExtended, mountExtended } from 'helpers/vue_test_utils_helper'; +import { useLocalStorageSpy } from 'helpers/local_storage_helper'; const TEST_EDIT_URL = '/gitlab-test/test/-/edit/main/'; const TEST_WEB_IDE_URL = '/-/ide/project/gitlab-test/test/edit/main/-/'; @@ -80,6 +86,8 @@ const ACTION_PIPELINE_EDITOR = { }; describe('Web IDE link component', () => { + useLocalStorageSpy(); + let wrapper; function createComponent( @@ -120,6 +128,10 @@ describe('Web IDE link component', () => { }); } + beforeEach(() => { + localStorage.setItem(PREFERRED_EDITOR_RESET_KEY, 'true'); + }); + afterEach(() => { wrapper.destroy(); }); @@ -525,4 +537,58 @@ describe('Web IDE link component', () => { }, ); }); + + describe('when vscode_web_ide feature flag is enabled', () => { + describe('when is not showing edit button', () => { + describe(`when ${PREFERRED_EDITOR_RESET_KEY} is unset`, () => { + beforeEach(() => { + localStorage.setItem.mockReset(); + localStorage.getItem.mockReturnValueOnce(null); + createComponent({ showEditButton: false }, { glFeatures: { vscodeWebIde: true } }); + }); + + it(`sets ${PREFERRED_EDITOR_KEY} local storage key to ${KEY_WEB_IDE}`, () => { + expect(localStorage.getItem).toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY); + expect(localStorage.setItem).toHaveBeenCalledWith(PREFERRED_EDITOR_KEY, KEY_WEB_IDE); + }); + + it(`sets ${PREFERRED_EDITOR_RESET_KEY} local storage key to true`, () => { + expect(localStorage.setItem).toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY, true); + }); + + it(`selects ${KEY_WEB_IDE} as the preferred editor`, () => { + expect(findActionsButton().props().selectedKey).toBe(KEY_WEB_IDE); + }); + }); + + describe(`when ${PREFERRED_EDITOR_RESET_KEY} is set to true`, () => { + beforeEach(() => { + localStorage.setItem.mockReset(); + localStorage.getItem.mockReturnValueOnce('true'); + createComponent({ showEditButton: false }, { glFeatures: { vscodeWebIde: true } }); + }); + + it(`does not update the persisted preferred editor`, () => { + expect(localStorage.getItem).toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY); + expect(localStorage.setItem).not.toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY); + }); + }); + }); + + describe('when is showing the edit button', () => { + it(`does not try to reset the ${PREFERRED_EDITOR_KEY}`, () => { + createComponent({ showEditButton: true }, { glFeatures: { vscodeWebIde: true } }); + + expect(localStorage.getItem).not.toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY); + }); + }); + }); + + describe('when vscode_web_ide feature flag is disabled', () => { + it(`does not try to reset the ${PREFERRED_EDITOR_KEY}`, () => { + createComponent({}, { glFeatures: { vscodeWebIde: false } }); + + expect(localStorage.getItem).not.toHaveBeenCalledWith(PREFERRED_EDITOR_RESET_KEY); + }); + }); }); diff --git a/spec/requests/api/access_requests_spec.rb b/spec/requests/api/access_requests_spec.rb index 2af6c438fc9..8c14ead9e42 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 do +RSpec.describe API::AccessRequests, feature_category: :authentication_and_authorization 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/admin/batched_background_migrations_spec.rb b/spec/requests/api/admin/batched_background_migrations_spec.rb index 3b396a91d3e..9712777d261 100644 --- a/spec/requests/api/admin/batched_background_migrations_spec.rb +++ b/spec/requests/api/admin/batched_background_migrations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Admin::BatchedBackgroundMigrations do +RSpec.describe API::Admin::BatchedBackgroundMigrations, feature_category: :database do let(:admin) { create(:admin) } let(:unauthorized_user) { create(:user) } diff --git a/spec/requests/api/admin/instance_clusters_spec.rb b/spec/requests/api/admin/instance_clusters_spec.rb index 7b3224f58c5..7b510f74fd4 100644 --- a/spec/requests/api/admin/instance_clusters_spec.rb +++ b/spec/requests/api/admin/instance_clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe ::API::Admin::InstanceClusters do +RSpec.describe ::API::Admin::InstanceClusters, feature_category: :kubernetes_management do include KubernetesHelpers let_it_be(:regular_user) { create(:user) } diff --git a/spec/requests/api/admin/plan_limits_spec.rb b/spec/requests/api/admin/plan_limits_spec.rb index 74ea3b0973f..047f79568ac 100644 --- a/spec/requests/api/admin/plan_limits_spec.rb +++ b/spec/requests/api/admin/plan_limits_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Admin::PlanLimits, 'PlanLimits' do +RSpec.describe API::Admin::PlanLimits, 'PlanLimits', feature_category: :not_owned do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } let_it_be(:plan) { create(:plan, name: 'default') } diff --git a/spec/requests/api/admin/sidekiq_spec.rb b/spec/requests/api/admin/sidekiq_spec.rb index 1e626c90e7e..0b456721d4f 100644 --- a/spec/requests/api/admin/sidekiq_spec.rb +++ b/spec/requests/api/admin/sidekiq_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Admin::Sidekiq, :clean_gitlab_redis_queues do +RSpec.describe API::Admin::Sidekiq, :clean_gitlab_redis_queues, feature_category: :not_owned do let_it_be(:admin) { create(:admin) } describe 'DELETE /admin/sidekiq/queues/:queue_name' do diff --git a/spec/requests/api/alert_management_alerts_spec.rb b/spec/requests/api/alert_management_alerts_spec.rb index 680a3883387..8dd0c46eab6 100644 --- a/spec/requests/api/alert_management_alerts_spec.rb +++ b/spec/requests/api/alert_management_alerts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::AlertManagementAlerts do +RSpec.describe API::AlertManagementAlerts, feature_category: :incident_management do let_it_be(:creator) { create(:user) } let_it_be(:project) do create(:project, :public, creator_id: creator.id, namespace: creator.namespace) diff --git a/spec/requests/api/api_guard/admin_mode_middleware_spec.rb b/spec/requests/api/api_guard/admin_mode_middleware_spec.rb index ba7a01a2cd9..21f3691c20b 100644 --- a/spec/requests/api/api_guard/admin_mode_middleware_spec.rb +++ b/spec/requests/api/api_guard/admin_mode_middleware_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::APIGuard::AdminModeMiddleware, :request_store do +RSpec.describe API::APIGuard::AdminModeMiddleware, :request_store, feature_category: :not_owned do let(:user) { create(:admin) } it 'is loaded' do diff --git a/spec/requests/api/api_guard/response_coercer_middleware_spec.rb b/spec/requests/api/api_guard/response_coercer_middleware_spec.rb index 6f3f97fe846..77498c2e2b3 100644 --- a/spec/requests/api/api_guard/response_coercer_middleware_spec.rb +++ b/spec/requests/api/api_guard/response_coercer_middleware_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::APIGuard::ResponseCoercerMiddleware do +RSpec.describe API::APIGuard::ResponseCoercerMiddleware, feature_category: :not_owned do using RSpec::Parameterized::TableSyntax it 'is loaded' do diff --git a/spec/requests/api/api_spec.rb b/spec/requests/api/api_spec.rb index 260f7cbc226..9cf9c313f11 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 do +RSpec.describe API::API, feature_category: :authentication_and_authorization do include GroupAPIHelpers describe 'Record user last activity in after hook' do diff --git a/spec/requests/api/appearance_spec.rb b/spec/requests/api/appearance_spec.rb index 69176e18d2e..865f391d6dc 100644 --- a/spec/requests/api/appearance_spec.rb +++ b/spec/requests/api/appearance_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Appearance, 'Appearance' do +RSpec.describe API::Appearance, 'Appearance', feature_category: :navigation do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb index 022451553ee..e238a1fb554 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 do +RSpec.describe API::Applications, :api, feature_category: :authentication_and_authorization do let(:admin_user) { create(:user, admin: true) } let(:user) { create(:user, admin: false) } let(:scopes) { 'api' } diff --git a/spec/requests/api/avatar_spec.rb b/spec/requests/api/avatar_spec.rb index 656a086e550..8affbe6ec2b 100644 --- a/spec/requests/api/avatar_spec.rb +++ b/spec/requests/api/avatar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Avatar do +RSpec.describe API::Avatar, feature_category: :users do let(:gravatar_service) { double('GravatarService') } describe 'GET /avatar' do diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb index bb563f93bfe..87dc06b7d15 100644 --- a/spec/requests/api/award_emoji_spec.rb +++ b/spec/requests/api/award_emoji_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::AwardEmoji do +RSpec.describe API::AwardEmoji, feature_category: :not_owned do let_it_be_with_reload(:project) { create(:project, :private) } let_it_be(:user) { create(:user) } let_it_be(:issue) { create(:issue, project: project) } diff --git a/spec/requests/api/badges_spec.rb b/spec/requests/api/badges_spec.rb index d8a345a79b0..6c6a7cc7cc6 100644 --- a/spec/requests/api/badges_spec.rb +++ b/spec/requests/api/badges_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Badges do +RSpec.describe API::Badges, feature_category: :projects do let(:maintainer) { create(:user, username: 'maintainer_user') } let(:developer) { create(:user) } let(:access_requester) { create(:user) } diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb index 4d7256a1f03..69804c2c4a4 100644 --- a/spec/requests/api/boards_spec.rb +++ b/spec/requests/api/boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Boards do +RSpec.describe API::Boards, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb index 186afaa1b79..eba1a06b5e4 100644 --- a/spec/requests/api/branches_spec.rb +++ b/spec/requests/api/branches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Branches do +RSpec.describe API::Branches, feature_category: :source_code_management do let_it_be(:user) { create(:user) } let(:project) { create(:project, :repository, creator: user, path: 'my.project', create_branch: 'ends-with.txt') } diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb index 76412c80f4c..5cbb7dbfa12 100644 --- a/spec/requests/api/broadcast_messages_spec.rb +++ b/spec/requests/api/broadcast_messages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::BroadcastMessages do +RSpec.describe API::BroadcastMessages, feature_category: :onboarding do let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } let_it_be(:message) { create(:broadcast_message) } diff --git a/spec/requests/api/bulk_imports_spec.rb b/spec/requests/api/bulk_imports_spec.rb index 95279f8d468..13f079c69e7 100644 --- a/spec/requests/api/bulk_imports_spec.rb +++ b/spec/requests/api/bulk_imports_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::BulkImports do +RSpec.describe API::BulkImports, feature_category: :importers do let_it_be(:user) { create(:user) } let_it_be(:import_1) { create(:bulk_import, user: user) } let_it_be(:import_2) { create(:bulk_import, user: user) } diff --git a/spec/requests/api/ci/job_artifacts_spec.rb b/spec/requests/api/ci/job_artifacts_spec.rb index da9eb6b2216..a4a38179d11 100644 --- a/spec/requests/api/ci/job_artifacts_spec.rb +++ b/spec/requests/api/ci/job_artifacts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::JobArtifacts do +RSpec.describe API::Ci::JobArtifacts, feature_category: :build_artifacts do include HttpBasicAuthHelpers include DependencyProxyHelpers diff --git a/spec/requests/api/ci/pipeline_schedules_spec.rb b/spec/requests/api/ci/pipeline_schedules_spec.rb index 30badadde13..2a2c5f65aee 100644 --- a/spec/requests/api/ci/pipeline_schedules_spec.rb +++ b/spec/requests/api/ci/pipeline_schedules_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::PipelineSchedules do +RSpec.describe API::Ci::PipelineSchedules, feature_category: :continuous_integration do let_it_be(:developer) { create(:user) } let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository, public_builds: false) } diff --git a/spec/requests/api/ci/pipelines_spec.rb b/spec/requests/api/ci/pipelines_spec.rb index c9d06f37c8b..6d69da85449 100644 --- a/spec/requests/api/ci/pipelines_spec.rb +++ b/spec/requests/api/ci/pipelines_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Pipelines do +RSpec.describe API::Ci::Pipelines, feature_category: :continuous_integration do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:project2) { create(:project, creator: user) } diff --git a/spec/requests/api/ci/resource_groups_spec.rb b/spec/requests/api/ci/resource_groups_spec.rb index 2a67a3e4322..26265aec1dc 100644 --- a/spec/requests/api/ci/resource_groups_spec.rb +++ b/spec/requests/api/ci/resource_groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::ResourceGroups do +RSpec.describe API::Ci::ResourceGroups, feature_category: :continuous_delivery do let_it_be(:project) { create(:project) } let_it_be(:developer) { create(:user).tap { |u| project.add_developer(u) } } let_it_be(:reporter) { create(:user).tap { |u| project.add_reporter(u) } } diff --git a/spec/requests/api/ci/runner/jobs_artifacts_spec.rb b/spec/requests/api/ci/runner/jobs_artifacts_spec.rb index 9af0541bd2c..1c119079c50 100644 --- a/spec/requests/api/ci/runner/jobs_artifacts_spec.rb +++ b/spec/requests/api/ci/runner/jobs_artifacts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do +RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state, feature_category: :runner do include StubGitlabCalls include RedisHelpers include WorkhorseHelpers diff --git a/spec/requests/api/ci/runner/jobs_put_spec.rb b/spec/requests/api/ci/runner/jobs_put_spec.rb index 8c95748aa5f..22817922b1b 100644 --- a/spec/requests/api/ci/runner/jobs_put_spec.rb +++ b/spec/requests/api/ci/runner/jobs_put_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do +RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state, feature_category: :runner do include StubGitlabCalls include RedisHelpers include WorkhorseHelpers diff --git a/spec/requests/api/ci/runner/jobs_request_post_spec.rb b/spec/requests/api/ci/runner/jobs_request_post_spec.rb index 9718632270a..d15bc9d2dd5 100644 --- a/spec/requests/api/ci/runner/jobs_request_post_spec.rb +++ b/spec/requests/api/ci/runner/jobs_request_post_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state do +RSpec.describe API::Ci::Runner, :clean_gitlab_redis_shared_state, feature_category: :runner do include StubGitlabCalls include RedisHelpers include WorkhorseHelpers diff --git a/spec/requests/api/ci/runner/jobs_trace_spec.rb b/spec/requests/api/ci/runner/jobs_trace_spec.rb index d42043a7fe5..de67cec0a27 100644 --- a/spec/requests/api/ci/runner/jobs_trace_spec.rb +++ b/spec/requests/api/ci/runner/jobs_trace_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Runner, :clean_gitlab_redis_trace_chunks do +RSpec.describe API::Ci::Runner, :clean_gitlab_redis_trace_chunks, feature_category: :runner do include StubGitlabCalls include RedisHelpers include WorkhorseHelpers diff --git a/spec/requests/api/ci/secure_files_spec.rb b/spec/requests/api/ci/secure_files_spec.rb index b0bca6e9125..4b396c430d0 100644 --- a/spec/requests/api/ci/secure_files_spec.rb +++ b/spec/requests/api/ci/secure_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::SecureFiles do +RSpec.describe API::Ci::SecureFiles, feature_category: :pipeline_authoring do before do stub_ci_secure_file_object_storage stub_feature_flags(ci_secure_files: true) diff --git a/spec/requests/api/ci/triggers_spec.rb b/spec/requests/api/ci/triggers_spec.rb index f9b7880a4c4..ff54ba61309 100644 --- a/spec/requests/api/ci/triggers_spec.rb +++ b/spec/requests/api/ci/triggers_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Triggers do +RSpec.describe API::Ci::Triggers, feature_category: :continuous_integration do let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } diff --git a/spec/requests/api/ci/variables_spec.rb b/spec/requests/api/ci/variables_spec.rb index cafb841995d..c5d01afb7c4 100644 --- a/spec/requests/api/ci/variables_spec.rb +++ b/spec/requests/api/ci/variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Ci::Variables do +RSpec.describe API::Ci::Variables, feature_category: :pipeline_authoring do let(:user) { create(:user) } let(:user2) { create(:user) } let!(:project) { create(:project, creator_id: user.id) } diff --git a/spec/requests/api/clusters/agent_tokens_spec.rb b/spec/requests/api/clusters/agent_tokens_spec.rb index ecf94ef7c50..b2d996e8002 100644 --- a/spec/requests/api/clusters/agent_tokens_spec.rb +++ b/spec/requests/api/clusters/agent_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Clusters::AgentTokens do +RSpec.describe API::Clusters::AgentTokens, feature_category: :kubernetes_management do let_it_be(:agent) { create(:cluster_agent) } let_it_be(:agent_token_one) { create(:cluster_agent_token, agent: agent) } let_it_be(:revoked_agent_token) { create(:cluster_agent_token, :revoked, agent: agent) } diff --git a/spec/requests/api/clusters/agents_spec.rb b/spec/requests/api/clusters/agents_spec.rb index 5e3bdd69529..a09713bd6e7 100644 --- a/spec/requests/api/clusters/agents_spec.rb +++ b/spec/requests/api/clusters/agents_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Clusters::Agents do +RSpec.describe API::Clusters::Agents, feature_category: :kubernetes_management do let_it_be(:agent) { create(:cluster_agent) } let(:user) { agent.created_by_user } diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb index 8cfac4b736f..025d065df7b 100644 --- a/spec/requests/api/commit_statuses_spec.rb +++ b/spec/requests/api/commit_statuses_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::CommitStatuses do +RSpec.describe API::CommitStatuses, feature_category: :continuous_integration do let_it_be(:project) { create(:project, :repository) } let_it_be(:commit) { project.repository.commit } let_it_be(:guest) { create_user(:guest) } diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb index 3b686fb6598..5874d764b00 100644 --- a/spec/requests/api/commits_spec.rb +++ b/spec/requests/api/commits_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'mime/types' -RSpec.describe API::Commits do +RSpec.describe API::Commits, feature_category: :source_code_management do include ProjectForksHelper include SessionHelpers diff --git a/spec/requests/api/composer_packages_spec.rb b/spec/requests/api/composer_packages_spec.rb index 4be488fc2f7..0c726d46a01 100644 --- a/spec/requests/api/composer_packages_spec.rb +++ b/spec/requests/api/composer_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::ComposerPackages do +RSpec.describe API::ComposerPackages, feature_category: :package_registry do include HttpBasicAuthHelpers let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/container_registry_event_spec.rb b/spec/requests/api/container_registry_event_spec.rb index 767e6e0b2ff..32c4b0e9598 100644 --- a/spec/requests/api/container_registry_event_spec.rb +++ b/spec/requests/api/container_registry_event_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ContainerRegistryEvent do +RSpec.describe API::ContainerRegistryEvent, feature_category: :container_registry do let(:secret_token) { 'secret_token' } let(:events) { [{ action: 'push' }] } let(:registry_headers) { { 'Content-Type' => ::API::ContainerRegistryEvent::DOCKER_DISTRIBUTION_EVENTS_V1_JSON } } diff --git a/spec/requests/api/container_repositories_spec.rb b/spec/requests/api/container_repositories_spec.rb index 0f0c88bef74..4c1e52df4fc 100644 --- a/spec/requests/api/container_repositories_spec.rb +++ b/spec/requests/api/container_repositories_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ContainerRepositories do +RSpec.describe API::ContainerRepositories, feature_category: :container_registry do include_context 'container registry client stubs' let_it_be(:project) { create(:project, :private) } diff --git a/spec/requests/api/debian_group_packages_spec.rb b/spec/requests/api/debian_group_packages_spec.rb index 9dbb75becf8..f4d5ef3fe90 100644 --- a/spec/requests/api/debian_group_packages_spec.rb +++ b/spec/requests/api/debian_group_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::DebianGroupPackages do +RSpec.describe API::DebianGroupPackages, feature_category: :package_registry do include HttpBasicAuthHelpers include WorkhorseHelpers diff --git a/spec/requests/api/debian_project_packages_spec.rb b/spec/requests/api/debian_project_packages_spec.rb index 6bef669cb3a..c27e165b39b 100644 --- a/spec/requests/api/debian_project_packages_spec.rb +++ b/spec/requests/api/debian_project_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::DebianProjectPackages do +RSpec.describe API::DebianProjectPackages, feature_category: :package_registry do include HttpBasicAuthHelpers include WorkhorseHelpers diff --git a/spec/requests/api/dependency_proxy_spec.rb b/spec/requests/api/dependency_proxy_spec.rb index 7af4ed08cb8..ef94cdbbe2b 100644 --- a/spec/requests/api/dependency_proxy_spec.rb +++ b/spec/requests/api/dependency_proxy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::DependencyProxy, api: true do +RSpec.describe API::DependencyProxy, api: true, feature_category: :dependency_proxy do let_it_be(:user) { create(:user) } let_it_be(:blob) { create(:dependency_proxy_blob) } let_it_be(:group, reload: true) { blob.group } diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb index 1daa7c38e04..15880d920c5 100644 --- a/spec/requests/api/deploy_keys_spec.rb +++ b/spec/requests/api/deploy_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::DeployKeys do +RSpec.describe API::DeployKeys, feature_category: :continuous_delivery do let_it_be(:user) { create(:user) } let_it_be(:maintainer) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/deploy_tokens_spec.rb b/spec/requests/api/deploy_tokens_spec.rb index e0296248a03..1fe1c15e54c 100644 --- a/spec/requests/api/deploy_tokens_spec.rb +++ b/spec/requests/api/deploy_tokens_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::DeployTokens do +RSpec.describe API::DeployTokens, feature_category: :continuous_delivery do let_it_be(:user) { create(:user) } let_it_be(:creator) { create(:user) } let_it_be(:project) { create(:project, creator_id: creator.id) } diff --git a/spec/requests/api/deployments_spec.rb b/spec/requests/api/deployments_spec.rb index 925fd068d64..efe76c9cfda 100644 --- a/spec/requests/api/deployments_spec.rb +++ b/spec/requests/api/deployments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Deployments, feature_category: :environment_management do +RSpec.describe API::Deployments, feature_category: :continuous_delivery do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } diff --git a/spec/requests/api/discussions_spec.rb b/spec/requests/api/discussions_spec.rb index 258bd26c05a..89769314daa 100644 --- a/spec/requests/api/discussions_spec.rb +++ b/spec/requests/api/discussions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Discussions do +RSpec.describe API::Discussions, feature_category: :team_planning do let(:user) { create(:user) } let!(:project) { create(:project, :public, :repository, namespace: user.namespace) } let(:private_user) { create(:user) } diff --git a/spec/requests/api/doorkeeper_access_spec.rb b/spec/requests/api/doorkeeper_access_spec.rb index 14da9a600cd..5116f074894 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' do +RSpec.describe 'doorkeeper access', feature_category: :authentication_and_authorization 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/environments_spec.rb b/spec/requests/api/environments_spec.rb index a35c1630caa..d7b0b365015 100644 --- a/spec/requests/api/environments_spec.rb +++ b/spec/requests/api/environments_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Environments do +RSpec.describe API::Environments, feature_category: :continuous_delivery do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:project) { create(:project, :private, :repository, namespace: user.namespace) } diff --git a/spec/requests/api/error_tracking/client_keys_spec.rb b/spec/requests/api/error_tracking/client_keys_spec.rb index ba4d713dff2..cb840e1cffa 100644 --- a/spec/requests/api/error_tracking/client_keys_spec.rb +++ b/spec/requests/api/error_tracking/client_keys_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ErrorTracking::ClientKeys do +RSpec.describe API::ErrorTracking::ClientKeys, feature_category: :error_tracking do let_it_be(:guest) { create(:user) } let_it_be(:maintainer) { create(:user) } let_it_be(:setting) { create(:project_error_tracking_setting) } diff --git a/spec/requests/api/error_tracking/collector_spec.rb b/spec/requests/api/error_tracking/collector_spec.rb index dfca994d1c3..6a3e71bc859 100644 --- a/spec/requests/api/error_tracking/collector_spec.rb +++ b/spec/requests/api/error_tracking/collector_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ErrorTracking::Collector do +RSpec.describe API::ErrorTracking::Collector, feature_category: :error_tracking do let_it_be(:project) { create(:project, :private) } let_it_be(:setting) { create(:project_error_tracking_setting, :integrated, project: project) } let_it_be(:client_key) { create(:error_tracking_client_key, project: project) } diff --git a/spec/requests/api/error_tracking/project_settings_spec.rb b/spec/requests/api/error_tracking/project_settings_spec.rb index c0c0680ef31..5906cdf105a 100644 --- a/spec/requests/api/error_tracking/project_settings_spec.rb +++ b/spec/requests/api/error_tracking/project_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ErrorTracking::ProjectSettings do +RSpec.describe API::ErrorTracking::ProjectSettings, feature_category: :error_tracking do let_it_be(:user) { create(:user) } let(:setting) { create(:project_error_tracking_setting) } diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb index d6c3999f22f..5c061a37ff3 100644 --- a/spec/requests/api/events_spec.rb +++ b/spec/requests/api/events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Events do +RSpec.describe API::Events, feature_category: :users do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:private_project) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/feature_flags_spec.rb b/spec/requests/api/feature_flags_spec.rb index bf7eec167f5..69e3633de57 100644 --- a/spec/requests/api/feature_flags_spec.rb +++ b/spec/requests/api/feature_flags_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::FeatureFlags do +RSpec.describe API::FeatureFlags, feature_category: :feature_flags do include FeatureFlagHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/feature_flags_user_lists_spec.rb b/spec/requests/api/feature_flags_user_lists_spec.rb index bfc57042ff4..443cbbea147 100644 --- a/spec/requests/api/feature_flags_user_lists_spec.rb +++ b/spec/requests/api/feature_flags_user_lists_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::FeatureFlagsUserLists do +RSpec.describe API::FeatureFlagsUserLists, feature_category: :feature_flags do let_it_be(:project, refind: true) { create(:project) } let_it_be(:client, refind: true) { create(:operations_feature_flags_client, project: project) } let_it_be(:developer) { create(:user) } diff --git a/spec/requests/api/features_spec.rb b/spec/requests/api/features_spec.rb index 70ce21dfcc0..9f1af746080 100644 --- a/spec/requests/api/features_spec.rb +++ b/spec/requests/api/features_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Features, stub_feature_flags: false do +RSpec.describe API::Features, stub_feature_flags: false, feature_category: :feature_flags do let_it_be(:user) { create(:user) } let_it_be(:opted_out) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb index d27f76eb9f8..12b9170a9b1 100644 --- a/spec/requests/api/files_spec.rb +++ b/spec/requests/api/files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Files do +RSpec.describe API::Files, feature_category: :source_code_management do include RepoHelpers let_it_be(:group) { create(:group, :public) } diff --git a/spec/requests/api/freeze_periods_spec.rb b/spec/requests/api/freeze_periods_spec.rb index 3da992301d5..170871706dc 100644 --- a/spec/requests/api/freeze_periods_spec.rb +++ b/spec/requests/api/freeze_periods_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::FreezePeriods do +RSpec.describe API::FreezePeriods, feature_category: :continuous_delivery do let_it_be(:project) { create(:project, :repository, :private) } let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/generic_packages_spec.rb b/spec/requests/api/generic_packages_spec.rb index c1faa722d30..6b3f378a4bc 100644 --- a/spec/requests/api/generic_packages_spec.rb +++ b/spec/requests/api/generic_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GenericPackages do +RSpec.describe API::GenericPackages, feature_category: :package_registry do include HttpBasicAuthHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/geo_spec.rb b/spec/requests/api/geo_spec.rb index 4e77fa9405c..3dec91fd2fa 100644 --- a/spec/requests/api/geo_spec.rb +++ b/spec/requests/api/geo_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Geo do +RSpec.describe API::Geo, feature_category: :geo_replication do include WorkhorseHelpers describe 'GET /geo/proxy' do diff --git a/spec/requests/api/go_proxy_spec.rb b/spec/requests/api/go_proxy_spec.rb index 5498ed6df13..17189087ade 100644 --- a/spec/requests/api/go_proxy_spec.rb +++ b/spec/requests/api/go_proxy_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GoProxy do +RSpec.describe API::GoProxy, feature_category: :package_registry do include PackagesManagerApiSpecHelpers include HttpBasicAuthHelpers diff --git a/spec/requests/api/graphql_spec.rb b/spec/requests/api/graphql_spec.rb index 9fd5f7f1430..d7724371cce 100644 --- a/spec/requests/api/graphql_spec.rb +++ b/spec/requests/api/graphql_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe 'GraphQL' do +RSpec.describe 'GraphQL', feature_category: :not_owned do include GraphqlHelpers include AfterNextHelpers diff --git a/spec/requests/api/group_avatar_spec.rb b/spec/requests/api/group_avatar_spec.rb index 50379d29b09..9a0e79ee9f8 100644 --- a/spec/requests/api/group_avatar_spec.rb +++ b/spec/requests/api/group_avatar_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupAvatar do +RSpec.describe API::GroupAvatar, feature_category: :subgroups do def avatar_path(group) "/groups/#{ERB::Util.url_encode(group.full_path)}/avatar" end diff --git a/spec/requests/api/group_boards_spec.rb b/spec/requests/api/group_boards_spec.rb index cc110aa4017..01f0e6e2061 100644 --- a/spec/requests/api/group_boards_spec.rb +++ b/spec/requests/api/group_boards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupBoards do +RSpec.describe API::GroupBoards, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:non_member) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/requests/api/group_clusters_spec.rb b/spec/requests/api/group_clusters_spec.rb index 8e127bf0710..68c3af01e56 100644 --- a/spec/requests/api/group_clusters_spec.rb +++ b/spec/requests/api/group_clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupClusters do +RSpec.describe API::GroupClusters, feature_category: :kubernetes_management do include KubernetesHelpers let(:current_user) { create(:user) } diff --git a/spec/requests/api/group_container_repositories_spec.rb b/spec/requests/api/group_container_repositories_spec.rb index fcb7085a17a..cd88b060a3a 100644 --- a/spec/requests/api/group_container_repositories_spec.rb +++ b/spec/requests/api/group_container_repositories_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupContainerRepositories do +RSpec.describe API::GroupContainerRepositories, feature_category: :container_registry do let_it_be(:group) { create(:group, :private) } let_it_be(:project) { create(:project, :private, group: group) } let_it_be(:reporter) { create(:user) } diff --git a/spec/requests/api/group_debian_distributions_spec.rb b/spec/requests/api/group_debian_distributions_spec.rb index 21c5f2f09a0..57b481e4f9f 100644 --- a/spec/requests/api/group_debian_distributions_spec.rb +++ b/spec/requests/api/group_debian_distributions_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::GroupDebianDistributions do +RSpec.describe API::GroupDebianDistributions, feature_category: :package_registry do include HttpBasicAuthHelpers include WorkhorseHelpers diff --git a/spec/requests/api/group_export_spec.rb b/spec/requests/api/group_export_spec.rb index 83c34204c78..565365506a7 100644 --- a/spec/requests/api/group_export_spec.rb +++ b/spec/requests/api/group_export_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupExport do +RSpec.describe API::GroupExport, feature_category: :importers do let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/group_import_spec.rb b/spec/requests/api/group_import_spec.rb index 893e60d80ce..07c21c93585 100644 --- a/spec/requests/api/group_import_spec.rb +++ b/spec/requests/api/group_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupImport do +RSpec.describe API::GroupImport, feature_category: :importers do include WorkhorseHelpers include_context 'workhorse headers' diff --git a/spec/requests/api/group_labels_spec.rb b/spec/requests/api/group_labels_spec.rb index 34533da53dd..1dd90413d35 100644 --- a/spec/requests/api/group_labels_spec.rb +++ b/spec/requests/api/group_labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupLabels do +RSpec.describe API::GroupLabels, feature_category: :team_planning do let_it_be(:valid_group_label_title_1) { 'Label foo & bar:subgroup::v.1' } let_it_be(:valid_group_label_title_1_esc) { ERB::Util.url_encode(valid_group_label_title_1) } let_it_be(:valid_group_label_title_2) { 'Bar & foo:subgroup::v.2' } diff --git a/spec/requests/api/group_milestones_spec.rb b/spec/requests/api/group_milestones_spec.rb index da84e98b905..91f64d02d43 100644 --- a/spec/requests/api/group_milestones_spec.rb +++ b/spec/requests/api/group_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupMilestones do +RSpec.describe API::GroupMilestones, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group, :private) } let_it_be(:project) { create(:project, namespace: group) } diff --git a/spec/requests/api/group_packages_spec.rb b/spec/requests/api/group_packages_spec.rb index a2b0b35c76a..0b4f6130132 100644 --- a/spec/requests/api/group_packages_spec.rb +++ b/spec/requests/api/group_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupPackages do +RSpec.describe API::GroupPackages, feature_category: :package_registry do let_it_be(:group) { create(:group, :public) } let_it_be(:project) { create(:project, :public, namespace: group, name: 'project A') } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/group_variables_spec.rb b/spec/requests/api/group_variables_spec.rb index a07a8ae4292..90b9606ec7b 100644 --- a/spec/requests/api/group_variables_spec.rb +++ b/spec/requests/api/group_variables_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::GroupVariables do +RSpec.describe API::GroupVariables, feature_category: :pipeline_authoring do let_it_be(:group) { create(:group) } let_it_be(:user) { create(:user) } let_it_be(:variable) { create(:ci_group_variable, group: group) } diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index c94bc1e1bac..12a6553f51a 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Groups do +RSpec.describe API::Groups, feature_category: :subgroups do include GroupAPIHelpers include UploadHelpers include WorkhorseHelpers diff --git a/spec/requests/api/helm_packages_spec.rb b/spec/requests/api/helm_packages_spec.rb index 249ab0e7302..584f6e3c7d4 100644 --- a/spec/requests/api/helm_packages_spec.rb +++ b/spec/requests/api/helm_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::HelmPackages do +RSpec.describe API::HelmPackages, feature_category: :package_registry do include_context 'helm api setup' using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/import_bitbucket_server_spec.rb b/spec/requests/api/import_bitbucket_server_spec.rb index 8ab41f49549..7c2df52fdf3 100644 --- a/spec/requests/api/import_bitbucket_server_spec.rb +++ b/spec/requests/api/import_bitbucket_server_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ImportBitbucketServer do +RSpec.describe API::ImportBitbucketServer, feature_category: :importers do let(:base_uri) { "https://test:7990" } let(:user) { create(:user) } let(:token) { "asdasd12345" } diff --git a/spec/requests/api/import_github_spec.rb b/spec/requests/api/import_github_spec.rb index 4f95295c14d..dce82f1cf37 100644 --- a/spec/requests/api/import_github_spec.rb +++ b/spec/requests/api/import_github_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ImportGithub do +RSpec.describe API::ImportGithub, feature_category: :importers do let(:token) { "asdasd12345" } let(:provider) { :github } let(:access_params) { { github_access_token: token } } diff --git a/spec/requests/api/integrations/jira_connect/subscriptions_spec.rb b/spec/requests/api/integrations/jira_connect/subscriptions_spec.rb index 8a222a99b34..762cbd5df10 100644 --- a/spec/requests/api/integrations/jira_connect/subscriptions_spec.rb +++ b/spec/requests/api/integrations/jira_connect/subscriptions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Integrations::JiraConnect::Subscriptions do +RSpec.describe API::Integrations::JiraConnect::Subscriptions, feature_category: :integrations do describe 'POST /integrations/jira_connect/subscriptions' do subject(:post_subscriptions) { post api('/integrations/jira_connect/subscriptions') } diff --git a/spec/requests/api/integrations_spec.rb b/spec/requests/api/integrations_spec.rb index 1e8061f9606..c35b9bab0ec 100644 --- a/spec/requests/api/integrations_spec.rb +++ b/spec/requests/api/integrations_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe API::Integrations do +RSpec.describe API::Integrations, feature_category: :integrations do let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index 5ad56d43f88..f9284f21aaa 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 do +RSpec.describe API::Internal::Base, feature_category: :authentication_and_authorization do include GitlabShellHelpers include APIInternalBaseHelpers diff --git a/spec/requests/api/internal/container_registry/migration_spec.rb b/spec/requests/api/internal/container_registry/migration_spec.rb index db2918e65f1..b9258e4627a 100644 --- a/spec/requests/api/internal/container_registry/migration_spec.rb +++ b/spec/requests/api/internal/container_registry/migration_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::ContainerRegistry::Migration, :aggregate_failures do +RSpec.describe API::Internal::ContainerRegistry::Migration, :aggregate_failures, feature_category: :database do let_it_be_with_reload(:repository) { create(:container_repository) } let(:secret_token) { 'secret_token' } diff --git a/spec/requests/api/internal/error_tracking_spec.rb b/spec/requests/api/internal/error_tracking_spec.rb index 4c420eb8505..83012e26138 100644 --- a/spec/requests/api/internal/error_tracking_spec.rb +++ b/spec/requests/api/internal/error_tracking_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::ErrorTracking do +RSpec.describe API::Internal::ErrorTracking, feature_category: :error_tracking do let(:secret_token) { Gitlab::CurrentSettings.error_tracking_access_token } let(:headers) do { ::API::Internal::ErrorTracking::GITLAB_ERROR_TRACKING_TOKEN_HEADER => secret_token } diff --git a/spec/requests/api/internal/kubernetes_spec.rb b/spec/requests/api/internal/kubernetes_spec.rb index f8fd81953b2..dc631ad7921 100644 --- a/spec/requests/api/internal/kubernetes_spec.rb +++ b/spec/requests/api/internal/kubernetes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::Kubernetes do +RSpec.describe API::Internal::Kubernetes, feature_category: :kubernetes_management do let(:jwt_auth_headers) do jwt_token = JWT.encode({ 'iss' => Gitlab::Kas::JWT_ISSUER }, Gitlab::Kas.secret, 'HS256') diff --git a/spec/requests/api/internal/lfs_spec.rb b/spec/requests/api/internal/lfs_spec.rb index 9eb48db5bd5..1021c03f736 100644 --- a/spec/requests/api/internal/lfs_spec.rb +++ b/spec/requests/api/internal/lfs_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::Lfs do +RSpec.describe API::Internal::Lfs, feature_category: :source_code_management do include GitlabShellHelpers include APIInternalBaseHelpers diff --git a/spec/requests/api/internal/mail_room_spec.rb b/spec/requests/api/internal/mail_room_spec.rb index a0a9c1f9cb3..7baa26e3508 100644 --- a/spec/requests/api/internal/mail_room_spec.rb +++ b/spec/requests/api/internal/mail_room_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::MailRoom do +RSpec.describe API::Internal::MailRoom, feature_category: :service_desk do let(:base_configs) do { enabled: true, diff --git a/spec/requests/api/internal/pages_spec.rb b/spec/requests/api/internal/pages_spec.rb index 5b970ca605c..56f1089843b 100644 --- a/spec/requests/api/internal/pages_spec.rb +++ b/spec/requests/api/internal/pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::Pages do +RSpec.describe API::Internal::Pages, feature_category: :pages do let(:auth_headers) do jwt_token = JWT.encode({ 'iss' => 'gitlab-pages' }, Gitlab::Pages.secret, 'HS256') { Gitlab::Pages::INTERNAL_API_REQUEST_HEADER => jwt_token } diff --git a/spec/requests/api/internal/workhorse_spec.rb b/spec/requests/api/internal/workhorse_spec.rb index bcf63bf7c2f..99d0ecabbb7 100644 --- a/spec/requests/api/internal/workhorse_spec.rb +++ b/spec/requests/api/internal/workhorse_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Internal::Workhorse, :allow_forgery_protection do +RSpec.describe API::Internal::Workhorse, :allow_forgery_protection, feature_category: :not_owned do include WorkhorseHelpers context '/authorize_upload' do diff --git a/spec/requests/api/invitations_spec.rb b/spec/requests/api/invitations_spec.rb index c07d2e11363..9d3ab269ca1 100644 --- a/spec/requests/api/invitations_spec.rb +++ b/spec/requests/api/invitations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Invitations do +RSpec.describe API::Invitations, feature_category: :users do let_it_be(:maintainer) { create(:user, username: 'maintainer_user') } let_it_be(:maintainer2) { create(:user, username: 'user-with-maintainer-role') } let_it_be(:developer) { create(:user) } diff --git a/spec/requests/api/issue_links_spec.rb b/spec/requests/api/issue_links_spec.rb index 67371bb1a17..93bf17d72d7 100644 --- a/spec/requests/api/issue_links_spec.rb +++ b/spec/requests/api/issue_links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::IssueLinks do +RSpec.describe API::IssueLinks, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:issue) { create(:issue, project: project) } diff --git a/spec/requests/api/issues/get_group_issues_spec.rb b/spec/requests/api/issues/get_group_issues_spec.rb index 5c06214316b..0641c2135c1 100644 --- a/spec/requests/api/issues/get_group_issues_spec.rb +++ b/spec/requests/api/issues/get_group_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Issues do +RSpec.describe API::Issues, feature_category: :team_planning do let_it_be(:user2) { create(:user) } let_it_be(:admin) { create(:user, :admin) } let_it_be(:non_member) { create(:user) } diff --git a/spec/requests/api/issues/get_project_issues_spec.rb b/spec/requests/api/issues/get_project_issues_spec.rb index ec6cc060c83..70966d23576 100644 --- a/spec/requests/api/issues/get_project_issues_spec.rb +++ b/spec/requests/api/issues/get_project_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Issues do +RSpec.describe API::Issues, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public, :repository, creator_id: user.id, namespace: user.namespace) } let_it_be(:private_mrs_project) do diff --git a/spec/requests/api/issues/issues_spec.rb b/spec/requests/api/issues/issues_spec.rb index 0e20b2133db..94f0443e14a 100644 --- a/spec/requests/api/issues/issues_spec.rb +++ b/spec/requests/api/issues/issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Issues do +RSpec.describe API::Issues, feature_category: :team_planning do using RSpec::Parameterized::TableSyntax let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/issues/post_projects_issues_spec.rb b/spec/requests/api/issues/post_projects_issues_spec.rb index deaf7be96ab..7305da1305a 100644 --- a/spec/requests/api/issues/post_projects_issues_spec.rb +++ b/spec/requests/api/issues/post_projects_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Issues do +RSpec.describe API::Issues, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) do create(:project, :public, creator_id: user.id, namespace: user.namespace) diff --git a/spec/requests/api/issues/put_projects_issues_spec.rb b/spec/requests/api/issues/put_projects_issues_spec.rb index d6c57b460e0..2d7439d65c1 100644 --- a/spec/requests/api/issues/put_projects_issues_spec.rb +++ b/spec/requests/api/issues/put_projects_issues_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Issues do +RSpec.describe API::Issues, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:owner) { create(:owner) } let(:user2) { create(:user) } diff --git a/spec/requests/api/keys_spec.rb b/spec/requests/api/keys_spec.rb index 67c3de324dc..d9a0f061156 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 do +RSpec.describe API::Keys, feature_category: :authentication_and_authorization 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/labels_spec.rb b/spec/requests/api/labels_spec.rb index 97ab90c9776..b5d7d564749 100644 --- a/spec/requests/api/labels_spec.rb +++ b/spec/requests/api/labels_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Labels do +RSpec.describe API::Labels, feature_category: :team_planning do def put_labels_api(route_type, user, spec_params, request_params = {}) if route_type == :deprecated put api("/projects/#{project.id}/labels", user), diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb index 5d8ed3dd0f5..82b87007a9b 100644 --- a/spec/requests/api/lint_spec.rb +++ b/spec/requests/api/lint_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Lint do +RSpec.describe API::Lint, feature_category: :pipeline_authoring do describe 'POST /ci/lint' do context 'when signup settings are disabled' do before do diff --git a/spec/requests/api/markdown_golden_master_spec.rb b/spec/requests/api/markdown_golden_master_spec.rb index 4fa946de342..1bb5a1d67ae 100644 --- a/spec/requests/api/markdown_golden_master_spec.rb +++ b/spec/requests/api/markdown_golden_master_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' # See spec/fixtures/markdown/markdown_golden_master_examples.yml for documentation on how this spec works. -RSpec.describe API::Markdown, 'Golden Master' do +RSpec.describe API::Markdown, 'Golden Master', feature_category: :team_planning do markdown_yml_file_path = File.expand_path('../../fixtures/markdown/markdown_golden_master_examples.yml', __dir__) include_context 'API::Markdown Golden Master shared context', markdown_yml_file_path end diff --git a/spec/requests/api/markdown_snapshot_spec.rb b/spec/requests/api/markdown_snapshot_spec.rb index f2019172a54..866cbcf8ff6 100644 --- a/spec/requests/api/markdown_snapshot_spec.rb +++ b/spec/requests/api/markdown_snapshot_spec.rb @@ -4,6 +4,6 @@ require 'spec_helper' # See https://docs.gitlab.com/ee/development/gitlab_flavored_markdown/specification_guide/#markdown-snapshot-testing # for documentation on this spec. -RSpec.describe API::Markdown, 'Snapshot' do +RSpec.describe API::Markdown, 'Snapshot', feature_category: :team_planning do include_context 'with API::Markdown Snapshot shared context' end diff --git a/spec/requests/api/markdown_spec.rb b/spec/requests/api/markdown_spec.rb index 6239ac4e749..db5bbd610fc 100644 --- a/spec/requests/api/markdown_spec.rb +++ b/spec/requests/api/markdown_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe API::Markdown do +RSpec.describe API::Markdown, feature_category: :team_planning do describe "POST /markdown" do let(:user) {} # No-op. It gets overwritten in the contexts below. let(:disable_authenticate_markdown_api) { false } diff --git a/spec/requests/api/maven_packages_spec.rb b/spec/requests/api/maven_packages_spec.rb index 4bb78eaab16..092eb442f1f 100644 --- a/spec/requests/api/maven_packages_spec.rb +++ b/spec/requests/api/maven_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::MavenPackages do +RSpec.describe API::MavenPackages, feature_category: :package_registry do using RSpec::Parameterized::TableSyntax include WorkhorseHelpers diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb index 69be574f38a..4eff5e96e9c 100644 --- a/spec/requests/api/members_spec.rb +++ b/spec/requests/api/members_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Members do +RSpec.describe API::Members, feature_category: :subgroups do let_it_be(:maintainer) { create(:user, username: 'maintainer_user') } let_it_be(:maintainer2) { create(:user, username: 'user-with-maintainer-role') } let_it_be(:developer) { create(:user) } diff --git a/spec/requests/api/merge_request_approvals_spec.rb b/spec/requests/api/merge_request_approvals_spec.rb index ba0039f46f8..a1d6abec97e 100644 --- a/spec/requests/api/merge_request_approvals_spec.rb +++ b/spec/requests/api/merge_request_approvals_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::MergeRequestApprovals do +RSpec.describe API::MergeRequestApprovals, feature_category: :source_code_management do let_it_be(:user) { create(:user) } let_it_be(:user2) { create(:user) } let_it_be(:bot) { create(:user, :project_bot) } diff --git a/spec/requests/api/merge_request_diffs_spec.rb b/spec/requests/api/merge_request_diffs_spec.rb index caef946273a..4f812e5d8eb 100644 --- a/spec/requests/api/merge_request_diffs_spec.rb +++ b/spec/requests/api/merge_request_diffs_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs' do +RSpec.describe API::MergeRequestDiffs, 'MergeRequestDiffs', feature_category: :source_code_management do let!(:user) { create(:user) } let!(:merge_request) { create(:merge_request, importing: true) } let!(:project) { merge_request.target_project } diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index aa0abe3fe64..0b69000ae7e 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe API::MergeRequests do +RSpec.describe API::MergeRequests, feature_category: :source_code_management do include ProjectForksHelper let_it_be(:base_time) { Time.now } diff --git a/spec/requests/api/metadata_spec.rb b/spec/requests/api/metadata_spec.rb index 5b6407c689b..b9bdadb01cc 100644 --- a/spec/requests/api/metadata_spec.rb +++ b/spec/requests/api/metadata_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Metadata do +RSpec.describe API::Metadata, feature_category: :not_owned do shared_examples_for 'GET /metadata' do context 'when unauthenticated' do it 'returns authentication error' do diff --git a/spec/requests/api/metrics/dashboard/annotations_spec.rb b/spec/requests/api/metrics/dashboard/annotations_spec.rb index a09596f167d..7932dd29e4d 100644 --- a/spec/requests/api/metrics/dashboard/annotations_spec.rb +++ b/spec/requests/api/metrics/dashboard/annotations_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Metrics::Dashboard::Annotations do +RSpec.describe API::Metrics::Dashboard::Annotations, feature_category: :metrics do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :private, :repository, namespace: user.namespace) } let_it_be(:environment) { create(:environment, project: project) } diff --git a/spec/requests/api/metrics/user_starred_dashboards_spec.rb b/spec/requests/api/metrics/user_starred_dashboards_spec.rb index 7f019e1226a..38d3c0be8b2 100644 --- a/spec/requests/api/metrics/user_starred_dashboards_spec.rb +++ b/spec/requests/api/metrics/user_starred_dashboards_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Metrics::UserStarredDashboards do +RSpec.describe API::Metrics::UserStarredDashboards, feature_category: :metrics do let_it_be(:user) { create(:user) } let_it_be(:dashboard_yml) { fixture_file('lib/gitlab/metrics/dashboard/sample_dashboard.yml') } let_it_be(:dashboard) { '.gitlab/dashboards/find&seek.yml' } diff --git a/spec/requests/api/ml/mlflow_spec.rb b/spec/requests/api/ml/mlflow_spec.rb index 9538d2b5e8d..c1ed7d56ba4 100644 --- a/spec/requests/api/ml/mlflow_spec.rb +++ b/spec/requests/api/ml/mlflow_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'mime/types' -RSpec.describe API::Ml::Mlflow do +RSpec.describe API::Ml::Mlflow, feature_category: :mlops do include SessionHelpers include ApiHelpers include HttpBasicAuthHelpers diff --git a/spec/requests/api/namespaces_spec.rb b/spec/requests/api/namespaces_spec.rb index ab39c29653f..30616964371 100644 --- a/spec/requests/api/namespaces_spec.rb +++ b/spec/requests/api/namespaces_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Namespaces do +RSpec.describe API::Namespaces, feature_category: :subgroups do let_it_be(:admin) { create(:admin) } let_it_be(:user) { create(:user) } let_it_be(:group1) { create(:group, name: 'group.one') } diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb index 89abb28140a..339927e86a6 100644 --- a/spec/requests/api/notes_spec.rb +++ b/spec/requests/api/notes_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Notes do +RSpec.describe API::Notes, feature_category: :team_planning do let!(:user) { create(:user) } let!(:project) { create(:project, :public) } let(:private_user) { create(:user) } diff --git a/spec/requests/api/notification_settings_spec.rb b/spec/requests/api/notification_settings_spec.rb index b5551c21738..2a80dc4bbe9 100644 --- a/spec/requests/api/notification_settings_spec.rb +++ b/spec/requests/api/notification_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::NotificationSettings do +RSpec.describe API::NotificationSettings, feature_category: :team_planning do let(:user) { create(:user) } let!(:group) { create(:group) } let!(:project) { create(:project, :public, creator_id: user.id, namespace: group) } diff --git a/spec/requests/api/npm_instance_packages_spec.rb b/spec/requests/api/npm_instance_packages_spec.rb index fa80d4f3df8..dcd2e4ae677 100644 --- a/spec/requests/api/npm_instance_packages_spec.rb +++ b/spec/requests/api/npm_instance_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::NpmInstancePackages do +RSpec.describe API::NpmInstancePackages, feature_category: :package_registry do # We need to create a subgroup with the same name as the hosting group. # It has to be created first to exhibit this bug: https://gitlab.com/gitlab-org/gitlab/-/issues/321958 let_it_be(:another_namespace) { create(:group, :public) } diff --git a/spec/requests/api/npm_project_packages_spec.rb b/spec/requests/api/npm_project_packages_spec.rb index 6fc3d0ceb48..c62c0849776 100644 --- a/spec/requests/api/npm_project_packages_spec.rb +++ b/spec/requests/api/npm_project_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::NpmProjectPackages do +RSpec.describe API::NpmProjectPackages, feature_category: :package_registry do include_context 'npm api setup' shared_examples 'accept get request on private project with access to package registry for everyone' do diff --git a/spec/requests/api/nuget_group_packages_spec.rb b/spec/requests/api/nuget_group_packages_spec.rb index a678d2efff8..9de612f7bc7 100644 --- a/spec/requests/api/nuget_group_packages_spec.rb +++ b/spec/requests/api/nuget_group_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::NugetGroupPackages do +RSpec.describe API::NugetGroupPackages, feature_category: :package_registry do include_context 'nuget api setup' using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/nuget_project_packages_spec.rb b/spec/requests/api/nuget_project_packages_spec.rb index 4866185cd12..1e0d35ad451 100644 --- a/spec/requests/api/nuget_project_packages_spec.rb +++ b/spec/requests/api/nuget_project_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::NugetProjectPackages do +RSpec.describe API::NugetProjectPackages, feature_category: :package_registry do include_context 'nuget api setup' using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb index cb7024b7166..b29f1e9e661 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' do +RSpec.describe 'OAuth tokens', feature_category: :authentication_and_authorization do include HttpBasicAuthHelpers context 'Resource Owner Password Credentials' do diff --git a/spec/requests/api/package_files_spec.rb b/spec/requests/api/package_files_spec.rb index 01c7ef1476f..f47dca387ef 100644 --- a/spec/requests/api/package_files_spec.rb +++ b/spec/requests/api/package_files_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::PackageFiles do +RSpec.describe API::PackageFiles, feature_category: :package_registry do let(:user) { create(:user) } let(:project) { create(:project, :public) } let(:package) { create(:maven_package, project: project) } diff --git a/spec/requests/api/pages/internal_access_spec.rb b/spec/requests/api/pages/internal_access_spec.rb index 4ac47f17b7e..fdc25ecdcd3 100644 --- a/spec/requests/api/pages/internal_access_spec.rb +++ b/spec/requests/api/pages/internal_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Internal Project Pages Access" do +RSpec.describe "Internal Project Pages Access", feature_category: :pages do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages/pages_spec.rb b/spec/requests/api/pages/pages_spec.rb index 4a94bf90205..c426f2a433c 100644 --- a/spec/requests/api/pages/pages_spec.rb +++ b/spec/requests/api/pages/pages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Pages do +RSpec.describe API::Pages, feature_category: :pages do let_it_be(:project) { create(:project, path: 'my.project', pages_https_only: false) } let_it_be(:admin) { create(:admin) } let_it_be(:user) { create(:user) } diff --git a/spec/requests/api/pages/private_access_spec.rb b/spec/requests/api/pages/private_access_spec.rb index c1c0e406508..5cc1b8f9a69 100644 --- a/spec/requests/api/pages/private_access_spec.rb +++ b/spec/requests/api/pages/private_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Private Project Pages Access" do +RSpec.describe "Private Project Pages Access", feature_category: :pages do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages/public_access_spec.rb b/spec/requests/api/pages/public_access_spec.rb index c45b3a4c55e..1137f91f4b0 100644 --- a/spec/requests/api/pages/public_access_spec.rb +++ b/spec/requests/api/pages/public_access_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe "Public Project Pages Access" do +RSpec.describe "Public Project Pages Access", feature_category: :pages do using RSpec::Parameterized::TableSyntax include AccessMatchers diff --git a/spec/requests/api/pages_domains_spec.rb b/spec/requests/api/pages_domains_spec.rb index 8ef4e899193..65fcf9e006a 100644 --- a/spec/requests/api/pages_domains_spec.rb +++ b/spec/requests/api/pages_domains_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::PagesDomains do +RSpec.describe API::PagesDomains, feature_category: :pages do let_it_be(:project) { create(:project, path: 'my.project', pages_https_only: false) } let_it_be(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/performance_bar_spec.rb b/spec/requests/api/performance_bar_spec.rb index a4dbb3d17b8..9fbe34914c5 100644 --- a/spec/requests/api/performance_bar_spec.rb +++ b/spec/requests/api/performance_bar_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' -RSpec.describe 'Performance Bar for API requests', :request_store, :clean_gitlab_redis_cache do +RSpec.describe 'Performance Bar for API requests', :request_store, :clean_gitlab_redis_cache, +feature_category: :metrics do context 'with user that has access to the performance bar' do let_it_be(:admin) { create(:admin) } 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 bdfac3ed14f..4a3c0ad8904 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 do +RSpec.describe API::PersonalAccessTokens::SelfInformation, feature_category: :authentication_and_authorization 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 1fa2ad6ebfa..32adc7ebd61 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 do +RSpec.describe API::PersonalAccessTokens, feature_category: :authentication_and_authorization do let_it_be(:path) { '/personal_access_tokens' } describe 'GET /personal_access_tokens' do diff --git a/spec/requests/api/project_clusters_spec.rb b/spec/requests/api/project_clusters_spec.rb index 4c7da78f0d4..895192252da 100644 --- a/spec/requests/api/project_clusters_spec.rb +++ b/spec/requests/api/project_clusters_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectClusters do +RSpec.describe API::ProjectClusters, feature_category: :kubernetes_management do include KubernetesHelpers let_it_be(:maintainer_user) { create(:user) } diff --git a/spec/requests/api/project_container_repositories_spec.rb b/spec/requests/api/project_container_repositories_spec.rb index 94aceffc6fa..38db4053822 100644 --- a/spec/requests/api/project_container_repositories_spec.rb +++ b/spec/requests/api/project_container_repositories_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectContainerRepositories do +RSpec.describe API::ProjectContainerRepositories, feature_category: :package_registry do include ExclusiveLeaseHelpers let_it_be(:project) { create(:project, :private) } diff --git a/spec/requests/api/project_debian_distributions_spec.rb b/spec/requests/api/project_debian_distributions_spec.rb index b7c9ae73df6..9807f177c5d 100644 --- a/spec/requests/api/project_debian_distributions_spec.rb +++ b/spec/requests/api/project_debian_distributions_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::ProjectDebianDistributions do +RSpec.describe API::ProjectDebianDistributions, feature_category: :package_registry do include HttpBasicAuthHelpers include WorkhorseHelpers diff --git a/spec/requests/api/project_events_spec.rb b/spec/requests/api/project_events_spec.rb index f3e592f9796..69d8eb76cf3 100644 --- a/spec/requests/api/project_events_spec.rb +++ b/spec/requests/api/project_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectEvents do +RSpec.describe API::ProjectEvents, feature_category: :users do let(:user) { create(:user) } let(:non_member) { create(:user) } let(:private_project) { create(:project, :private, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/project_export_spec.rb b/spec/requests/api/project_export_spec.rb index d74fd82ca09..fdd76c63069 100644 --- a/spec/requests/api/project_export_spec.rb +++ b/spec/requests/api/project_export_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectExport, :clean_gitlab_redis_cache do +RSpec.describe API::ProjectExport, :clean_gitlab_redis_cache, feature_category: :importers do let_it_be(:project) { create(:project) } let_it_be(:project_none) { create(:project) } let_it_be(:project_started) { create(:project) } diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb index 2d925620a91..8e5e9d847ea 100644 --- a/spec/requests/api/project_hooks_spec.rb +++ b/spec/requests/api/project_hooks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectHooks, 'ProjectHooks' do +RSpec.describe API::ProjectHooks, 'ProjectHooks', feature_category: :integrations do let_it_be(:user) { create(:user) } let_it_be(:user3) { create(:user) } let_it_be(:project) { create(:project, creator_id: user.id, namespace: user.namespace) } diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index 347a930c038..027c61bb9e1 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectImport, :aggregate_failures do +RSpec.describe API::ProjectImport, :aggregate_failures, feature_category: :importers do include WorkhorseHelpers include AfterNextHelpers diff --git a/spec/requests/api/project_milestones_spec.rb b/spec/requests/api/project_milestones_spec.rb index 8294ca143d3..9d722e4a445 100644 --- a/spec/requests/api/project_milestones_spec.rb +++ b/spec/requests/api/project_milestones_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectMilestones do +RSpec.describe API::ProjectMilestones, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be_with_reload(:project) { create(:project, namespace: user.namespace) } let_it_be(:closed_milestone) { create(:closed_milestone, project: project, title: 'version1', description: 'closed milestone') } diff --git a/spec/requests/api/project_packages_spec.rb b/spec/requests/api/project_packages_spec.rb index 5d7266932cb..d3adef85f8d 100644 --- a/spec/requests/api/project_packages_spec.rb +++ b/spec/requests/api/project_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectPackages do +RSpec.describe API::ProjectPackages, feature_category: :package_registry do let_it_be(:project) { create(:project, :public) } let(:user) { create(:user) } diff --git a/spec/requests/api/project_repository_storage_moves_spec.rb b/spec/requests/api/project_repository_storage_moves_spec.rb index 5b272121233..96ed3042d00 100644 --- a/spec/requests/api/project_repository_storage_moves_spec.rb +++ b/spec/requests/api/project_repository_storage_moves_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectRepositoryStorageMoves do +RSpec.describe API::ProjectRepositoryStorageMoves, feature_category: :gitaly do it_behaves_like 'repository_storage_moves API', 'projects' do let_it_be(:container) { create(:project, :repository) } let_it_be(:storage_move) { create(:project_repository_storage_move, :scheduled, container: container) } diff --git a/spec/requests/api/project_snapshots_spec.rb b/spec/requests/api/project_snapshots_spec.rb index 5a06800c8f6..5d3c596e605 100644 --- a/spec/requests/api/project_snapshots_spec.rb +++ b/spec/requests/api/project_snapshots_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectSnapshots do +RSpec.describe API::ProjectSnapshots, feature_category: :source_code_management do include WorkhorseHelpers let(:project) { create(:project) } diff --git a/spec/requests/api/project_snippets_spec.rb b/spec/requests/api/project_snippets_spec.rb index 1d255f7c1d8..568486deb7f 100644 --- a/spec/requests/api/project_snippets_spec.rb +++ b/spec/requests/api/project_snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectSnippets do +RSpec.describe API::ProjectSnippets, feature_category: :source_code_management do include SnippetHelpers let_it_be(:project) { create(:project, :public) } diff --git a/spec/requests/api/project_statistics_spec.rb b/spec/requests/api/project_statistics_spec.rb index d314af0746a..39ead8cc573 100644 --- a/spec/requests/api/project_statistics_spec.rb +++ b/spec/requests/api/project_statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectStatistics do +RSpec.describe API::ProjectStatistics, feature_category: :source_code_management do let_it_be(:reporter) { create(:user) } let_it_be(:public_project) { create(:project, :public) } diff --git a/spec/requests/api/project_templates_spec.rb b/spec/requests/api/project_templates_spec.rb index 87d70a87f42..38d6a05a104 100644 --- a/spec/requests/api/project_templates_spec.rb +++ b/spec/requests/api/project_templates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProjectTemplates do +RSpec.describe API::ProjectTemplates, feature_category: :source_code_management do let_it_be(:public_project) { create(:project, :public, :repository, create_templates: :merge_request, path: 'path.with.dot') } let_it_be(:private_project) { create(:project, :private, :repository, create_templates: :issue) } let_it_be(:developer) { create(:user) } diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index d8a0af4851b..2c34445e73d 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.shared_examples 'languages and percentages JSON response' do +RSpec.shared_examples 'languages and percentages JSON response', feature_category: :projects do let(:expected_languages) { project.repository.languages.to_h { |language| language.values_at(:label, :value) } } before do diff --git a/spec/requests/api/protected_branches_spec.rb b/spec/requests/api/protected_branches_spec.rb index b46859a0e70..8e8a25a8dc2 100644 --- a/spec/requests/api/protected_branches_spec.rb +++ b/spec/requests/api/protected_branches_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProtectedBranches do +RSpec.describe API::ProtectedBranches, feature_category: :source_code_management do let_it_be_with_reload(:project) { create(:project, :repository) } let_it_be(:maintainer) { create(:user) } let_it_be(:guest) { create(:user) } diff --git a/spec/requests/api/protected_tags_spec.rb b/spec/requests/api/protected_tags_spec.rb index f1db39ac204..5b128d4ec9e 100644 --- a/spec/requests/api/protected_tags_spec.rb +++ b/spec/requests/api/protected_tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ProtectedTags do +RSpec.describe API::ProtectedTags, feature_category: :source_code_management do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository) } let_it_be(:project2) { create(:project, path: 'project2', namespace: user.namespace) } diff --git a/spec/requests/api/pypi_packages_spec.rb b/spec/requests/api/pypi_packages_spec.rb index 2b022dc8f62..59d93cd48e3 100644 --- a/spec/requests/api/pypi_packages_spec.rb +++ b/spec/requests/api/pypi_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::PypiPackages do +RSpec.describe API::PypiPackages, feature_category: :package_registry do include WorkhorseHelpers include PackagesManagerApiSpecHelpers include HttpBasicAuthHelpers diff --git a/spec/requests/api/release/links_spec.rb b/spec/requests/api/release/links_spec.rb index 38166c5ce97..6036960c43c 100644 --- a/spec/requests/api/release/links_spec.rb +++ b/spec/requests/api/release/links_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Release::Links do +RSpec.describe API::Release::Links, feature_category: :release_orchestration do let(:project) { create(:project, :repository, :private) } let(:maintainer) { create(:user) } let(:developer) { create(:user) } diff --git a/spec/requests/api/releases_spec.rb b/spec/requests/api/releases_spec.rb index 754b77af60e..a1aff9a6b1c 100644 --- a/spec/requests/api/releases_spec.rb +++ b/spec/requests/api/releases_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Releases do +RSpec.describe API::Releases, feature_category: :release_orchestration do let(:project) { create(:project, :repository, :private) } let(:maintainer) { create(:user) } let(:reporter) { create(:user) } diff --git a/spec/requests/api/remote_mirrors_spec.rb b/spec/requests/api/remote_mirrors_spec.rb index b377aaf9e87..3da1760e319 100644 --- a/spec/requests/api/remote_mirrors_spec.rb +++ b/spec/requests/api/remote_mirrors_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::RemoteMirrors do +RSpec.describe API::RemoteMirrors, feature_category: :source_code_management do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :repository, :remote_mirror) } let_it_be(:developer) { create(:user) { |u| project.add_developer(u) } } diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index 04c7bad91a8..393ada1da4f 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'mime/types' -RSpec.describe API::Repositories do +RSpec.describe API::Repositories, feature_category: :source_code_management do include RepoHelpers include WorkhorseHelpers include ProjectForksHelper diff --git a/spec/requests/api/resource_access_tokens_spec.rb b/spec/requests/api/resource_access_tokens_spec.rb index 24efac3128d..6a89e9a56df 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 do +RSpec.describe API::ResourceAccessTokens, feature_category: :authentication_and_authorization do let_it_be(:user) { create(:user) } let_it_be(:user_non_priviledged) { create(:user) } diff --git a/spec/requests/api/resource_label_events_spec.rb b/spec/requests/api/resource_label_events_spec.rb index a4a70d89812..1adffea17b7 100644 --- a/spec/requests/api/resource_label_events_spec.rb +++ b/spec/requests/api/resource_label_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ResourceLabelEvents do +RSpec.describe API::ResourceLabelEvents, feature_category: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, :public, namespace: user.namespace) } let_it_be(:label) { create(:label, project: project) } diff --git a/spec/requests/api/resource_milestone_events_spec.rb b/spec/requests/api/resource_milestone_events_spec.rb index 5c81c2180d7..fe991533c85 100644 --- a/spec/requests/api/resource_milestone_events_spec.rb +++ b/spec/requests/api/resource_milestone_events_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::ResourceMilestoneEvents do +RSpec.describe API::ResourceMilestoneEvents, feature_category: :team_planning do let!(:user) { create(:user) } let!(:project) { create(:project, :public, namespace: user.namespace) } let!(:milestone) { create(:milestone, project: project) } diff --git a/spec/requests/api/rpm_project_packages_spec.rb b/spec/requests/api/rpm_project_packages_spec.rb index 19247c30333..515970f86a1 100644 --- a/spec/requests/api/rpm_project_packages_spec.rb +++ b/spec/requests/api/rpm_project_packages_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'spec_helper' -RSpec.describe API::RpmProjectPackages do +RSpec.describe API::RpmProjectPackages, feature_category: :package_registry do include HttpBasicAuthHelpers include WorkhorseHelpers diff --git a/spec/requests/api/rubygem_packages_spec.rb b/spec/requests/api/rubygem_packages_spec.rb index ee43aaa6ead..6f048fa57a8 100644 --- a/spec/requests/api/rubygem_packages_spec.rb +++ b/spec/requests/api/rubygem_packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::RubygemPackages do +RSpec.describe API::RubygemPackages, feature_category: :package_registry do include PackagesManagerApiSpecHelpers include WorkhorseHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/search_spec.rb b/spec/requests/api/search_spec.rb index 60acf6b71dd..430d3b7d187 100644 --- a/spec/requests/api/search_spec.rb +++ b/spec/requests/api/search_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Search do +RSpec.describe API::Search, feature_category: :global_search do let_it_be(:user) { create(:user) } let_it_be(:group) { create(:group) } let_it_be(:project, reload: true) { create(:project, :wiki_repo, :public, name: 'awesome project', group: group) } diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb index a169db87b1a..504fb5a7261 100644 --- a/spec/requests/api/settings_spec.rb +++ b/spec/requests/api/settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Settings, 'Settings', :do_not_mock_admin_mode_setting do +RSpec.describe API::Settings, 'Settings', :do_not_mock_admin_mode_setting, feature_category: :not_owned do let(:user) { create(:user) } let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/sidekiq_metrics_spec.rb b/spec/requests/api/sidekiq_metrics_spec.rb index 302d824e650..1085df97cc7 100644 --- a/spec/requests/api/sidekiq_metrics_spec.rb +++ b/spec/requests/api/sidekiq_metrics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::SidekiqMetrics do +RSpec.describe API::SidekiqMetrics, feature_category: :not_owned do let(:admin) { create(:user, :admin) } describe 'GET sidekiq/*' do diff --git a/spec/requests/api/snippet_repository_storage_moves_spec.rb b/spec/requests/api/snippet_repository_storage_moves_spec.rb index 40d01500ac1..6081531aee9 100644 --- a/spec/requests/api/snippet_repository_storage_moves_spec.rb +++ b/spec/requests/api/snippet_repository_storage_moves_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::SnippetRepositoryStorageMoves do +RSpec.describe API::SnippetRepositoryStorageMoves, feature_category: :gitaly do it_behaves_like 'repository_storage_moves API', 'snippets' do let_it_be(:container) { create(:snippet, :repository).tap { |snippet| snippet.create_repository } } let_it_be(:storage_move) { create(:snippet_repository_storage_move, :scheduled, container: container) } diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb index 9408d1cc248..dd0da0cb887 100644 --- a/spec/requests/api/snippets_spec.rb +++ b/spec/requests/api/snippets_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Snippets, factory_default: :keep do +RSpec.describe API::Snippets, factory_default: :keep, feature_category: :source_code_management do include SnippetHelpers let_it_be(:admin) { create(:user, :admin) } diff --git a/spec/requests/api/statistics_spec.rb b/spec/requests/api/statistics_spec.rb index baffb2792e9..85fed48a077 100644 --- a/spec/requests/api/statistics_spec.rb +++ b/spec/requests/api/statistics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Statistics, 'Statistics' do +RSpec.describe API::Statistics, 'Statistics', feature_category: :devops_reports do include ProjectForksHelper tables_to_analyze = %w[ projects diff --git a/spec/requests/api/submodules_spec.rb b/spec/requests/api/submodules_spec.rb index 9840476ca27..7b041ab7c4b 100644 --- a/spec/requests/api/submodules_spec.rb +++ b/spec/requests/api/submodules_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Submodules do +RSpec.describe API::Submodules, feature_category: :source_code_management do let(:user) { create(:user) } let!(:project) { create(:project, :repository, namespace: user.namespace) } let(:guest) { create(:user) { |u| project.add_guest(u) } } diff --git a/spec/requests/api/suggestions_spec.rb b/spec/requests/api/suggestions_spec.rb index dfc5d169af6..93b2435c601 100644 --- a/spec/requests/api/suggestions_spec.rb +++ b/spec/requests/api/suggestions_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Suggestions do +RSpec.describe API::Suggestions, feature_category: :code_review do let(:project) { create(:project, :repository) } let(:user) { create(:user) } diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb index 0f1dbea2e73..51edf4b3b3e 100644 --- a/spec/requests/api/system_hooks_spec.rb +++ b/spec/requests/api/system_hooks_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::SystemHooks do +RSpec.describe API::SystemHooks, feature_category: :integrations do let_it_be(:non_admin) { create(:user) } let_it_be(:admin) { create(:admin) } let_it_be_with_refind(:hook) { create(:system_hook, url: "http://example.com") } diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb index 3f2ca2a0938..0ba0b718ad0 100644 --- a/spec/requests/api/tags_spec.rb +++ b/spec/requests/api/tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Tags do +RSpec.describe API::Tags, feature_category: :source_code_management do let(:user) { create(:user) } let(:guest) { create(:user).tap { |u| project.add_guest(u) } } let(:project) { create(:project, :repository, creator: user, path: 'my.project') } diff --git a/spec/requests/api/task_completion_status_spec.rb b/spec/requests/api/task_completion_status_spec.rb index 6cc1fb6c713..c46d6954da3 100644 --- a/spec/requests/api/task_completion_status_spec.rb +++ b/spec/requests/api/task_completion_status_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'task completion status response' do +RSpec.describe 'task completion status response', features: :team_planning do let_it_be(:user) { create(:user) } let_it_be(:project) do create(:project, :public, creator_id: user.id, namespace: user.namespace) diff --git a/spec/requests/api/templates_spec.rb b/spec/requests/api/templates_spec.rb index adb37c62dc3..8782c3cba4b 100644 --- a/spec/requests/api/templates_spec.rb +++ b/spec/requests/api/templates_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Templates do +RSpec.describe API::Templates, feature_category: :source_code_management do context 'the Template Entity' do before do get api('/templates/gitignores/Ruby') diff --git a/spec/requests/api/terraform/modules/v1/packages_spec.rb b/spec/requests/api/terraform/modules/v1/packages_spec.rb index c2af3a134f4..2bd7cb027aa 100644 --- a/spec/requests/api/terraform/modules/v1/packages_spec.rb +++ b/spec/requests/api/terraform/modules/v1/packages_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Terraform::Modules::V1::Packages do +RSpec.describe API::Terraform::Modules::V1::Packages, feature_category: :package_registry do include PackagesManagerApiSpecHelpers include WorkhorseHelpers using RSpec::Parameterized::TableSyntax diff --git a/spec/requests/api/terraform/state_spec.rb b/spec/requests/api/terraform/state_spec.rb index 38b08b4e214..c3cd6cb808c 100644 --- a/spec/requests/api/terraform/state_spec.rb +++ b/spec/requests/api/terraform/state_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Terraform::State, :snowplow do +RSpec.describe API::Terraform::State, :snowplow, feature_category: :infrastructure_as_code do include HttpBasicAuthHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/terraform/state_version_spec.rb b/spec/requests/api/terraform/state_version_spec.rb index ade0aacf805..28abbb5749d 100644 --- a/spec/requests/api/terraform/state_version_spec.rb +++ b/spec/requests/api/terraform/state_version_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Terraform::StateVersion do +RSpec.describe API::Terraform::StateVersion, feature_category: :infrastructure_as_code do include HttpBasicAuthHelpers let_it_be(:project) { create(:project) } diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb index 7a626ee4d29..064654dabd3 100644 --- a/spec/requests/api/todos_spec.rb +++ b/spec/requests/api/todos_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Todos do +RSpec.describe API::Todos, feature_category: :source_code_management do include DesignManagementTestHelpers let_it_be(:group) { create(:group) } diff --git a/spec/requests/api/topics_spec.rb b/spec/requests/api/topics_spec.rb index 1ad6f876fab..14719292557 100644 --- a/spec/requests/api/topics_spec.rb +++ b/spec/requests/api/topics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Topics do +RSpec.describe API::Topics, feature_category: :projects do include WorkhorseHelpers let_it_be(:file) { fixture_file_upload('spec/fixtures/dk.png') } diff --git a/spec/requests/api/unleash_spec.rb b/spec/requests/api/unleash_spec.rb index c324ddeacd7..5daf7cd7b75 100644 --- a/spec/requests/api/unleash_spec.rb +++ b/spec/requests/api/unleash_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Unleash do +RSpec.describe API::Unleash, feature_category: :feature_flags do include FeatureFlagHelpers let_it_be(:project, refind: true) { create(:project) } diff --git a/spec/requests/api/usage_data_non_sql_metrics_spec.rb b/spec/requests/api/usage_data_non_sql_metrics_spec.rb index 0b73d0f96a4..0a6f248af2c 100644 --- a/spec/requests/api/usage_data_non_sql_metrics_spec.rb +++ b/spec/requests/api/usage_data_non_sql_metrics_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::UsageDataNonSqlMetrics do +RSpec.describe API::UsageDataNonSqlMetrics, feature_category: :service_ping do include UsageDataHelpers let_it_be(:admin) { create(:user, admin: true) } diff --git a/spec/requests/api/usage_data_queries_spec.rb b/spec/requests/api/usage_data_queries_spec.rb index c2fb7d0c72a..e556064025c 100644 --- a/spec/requests/api/usage_data_queries_spec.rb +++ b/spec/requests/api/usage_data_queries_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require 'rake_helper' -RSpec.describe API::UsageDataQueries do +RSpec.describe API::UsageDataQueries, feature_category: :service_ping do include UsageDataHelpers let_it_be(:admin) { create(:user, admin: true) } diff --git a/spec/requests/api/usage_data_spec.rb b/spec/requests/api/usage_data_spec.rb index d532fb6c168..935ddbf4764 100644 --- a/spec/requests/api/usage_data_spec.rb +++ b/spec/requests/api/usage_data_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::UsageData do +RSpec.describe API::UsageData, feature_category: :service_ping do let_it_be(:user) { create(:user) } describe 'POST /usage_data/increment_counter' do diff --git a/spec/requests/api/user_counts_spec.rb b/spec/requests/api/user_counts_spec.rb index 369ae49de08..27e5311e2eb 100644 --- a/spec/requests/api/user_counts_spec.rb +++ b/spec/requests/api/user_counts_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::UserCounts do +RSpec.describe API::UserCounts, feature_category: :service_ping do let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project, :public) } let_it_be(:issue) { create(:issue, project: project, author: user, assignees: [user]) } diff --git a/spec/requests/api/users_preferences_spec.rb b/spec/requests/api/users_preferences_spec.rb index 97e37263ee6..53f366371e5 100644 --- a/spec/requests/api/users_preferences_spec.rb +++ b/spec/requests/api/users_preferences_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Users do +RSpec.describe API::Users, feature_category: :users do let_it_be(:user) { create(:user) } describe 'PUT /user/preferences/' do diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb index e4e7e35309b..bfb71d95f5e 100644 --- a/spec/requests/api/users_spec.rb +++ b/spec/requests/api/users_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::Users do +RSpec.describe API::Users, feature_category: :users do include WorkhorseHelpers let_it_be(:admin) { create(:admin) } diff --git a/spec/requests/api/v3/github_spec.rb b/spec/requests/api/v3/github_spec.rb index 5bfea15f0ca..0b8fac5c55c 100644 --- a/spec/requests/api/v3/github_spec.rb +++ b/spec/requests/api/v3/github_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe API::V3::Github do +RSpec.describe API::V3::Github, feature_category: :integrations do let_it_be(:user) { create(:user) } let_it_be(:unauthorized_user) { create(:user) } let_it_be(:admin) { create(:user, :admin) } diff --git a/spec/requests/api/wikis_spec.rb b/spec/requests/api/wikis_spec.rb index f4096eef8d0..00e38a5bb7e 100644 --- a/spec/requests/api/wikis_spec.rb +++ b/spec/requests/api/wikis_spec.rb @@ -12,7 +12,7 @@ require 'spec_helper' # - maintainer # because they are 3 edge cases of using wiki pages. -RSpec.describe API::Wikis do +RSpec.describe API::Wikis, feature_category: :wiki do include WorkhorseHelpers include AfterNextHelpers diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb index 4d23d6253ec..e60954a19ed 100644 --- a/spec/services/event_create_service_spec.rb +++ b/spec/services/event_create_service_spec.rb @@ -321,10 +321,7 @@ RSpec.describe EventCreateService, :clean_gitlab_redis_cache, :clean_gitlab_redi let(:namespace) { project.namespace } let(:feature_flag_name) { :route_hll_to_snowplow } let(:label) { 'usage_activity_by_stage_monthly.create.action_monthly_active_users_project_repo' } - let(:context) do - [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, - event: 'action_active_users_project_repo').to_context] - end + let(:property) { 'project_action' } end end @@ -351,10 +348,7 @@ RSpec.describe EventCreateService, :clean_gitlab_redis_cache, :clean_gitlab_redi let(:namespace) { project.namespace } let(:feature_flag_name) { :route_hll_to_snowplow } let(:label) { 'usage_activity_by_stage_monthly.create.action_monthly_active_users_project_repo' } - let(:context) do - [Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll, - event: 'action_active_users_project_repo').to_context] - end + let(:property) { 'project_action' } end end |