diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 18:07:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-12 18:07:13 +0000 |
commit | ba5be4989e02566ad45191b6d97815e189a26dac (patch) | |
tree | 96a4ace3c3d61ec4aea31cbf548718ef67cfd84b /spec/tasks | |
parent | 22a3da26ad21d67acaef7b2598429c8a003f1037 (diff) | |
download | gitlab-ce-ba5be4989e02566ad45191b6d97815e189a26dac.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r-- | spec/tasks/gitlab/feature_categories_rake_spec.rb | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/feature_categories_rake_spec.rb b/spec/tasks/gitlab/feature_categories_rake_spec.rb new file mode 100644 index 00000000000..22f36309a7c --- /dev/null +++ b/spec/tasks/gitlab/feature_categories_rake_spec.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +require 'rake_helper' + +RSpec.describe 'gitlab:feature_categories:index', :silence_stdout, feature_category: :scalability do + before do + Rake.application.rake_require 'tasks/gitlab/feature_categories' + end + + it 'outputs objects by stage group' do + # Sample items that _hopefully_ won't change very often. + expected = { + 'controller_actions' => a_hash_including( + 'integrations' => a_collection_including( + klass: 'Oauth::JiraDvcs::AuthorizationsController', + action: 'new', + source_location: [ + 'app/controllers/oauth/jira_dvcs/authorizations_controller.rb', + an_instance_of(Integer) + ] + ) + ), + 'api_endpoints' => a_hash_including( + 'authentication_and_authorization' => a_collection_including( + klass: 'API::AccessRequests', + action: '/groups/:id/access_requests', + source_location: [ + 'lib/api/access_requests.rb', + an_instance_of(Integer) + ] + ) + ), + 'sidekiq_workers' => a_hash_including( + 'source_code_management' => a_collection_including( + klass: 'MergeWorker', + source_location: [ + 'app/workers/merge_worker.rb', + an_instance_of(Integer) + ] + ) + ), + 'database_tables' => a_hash_including( + 'container_scanning' => a_collection_including('vulnerability_advisories') + ) + } + + expect(YAML).to receive(:dump).with(a_hash_including(expected)) + + run_rake_task('gitlab:feature_categories:index') + end +end |