diff --git a/scripts/verify-tff-mapping b/scripts/verify-tff-mapping index 7cfdf9b1154608065ca07c68f1d51be2ba1cfaf2..a61c5a7e3731ad2929f740af1b3c9c6ba9f6896a 100755 --- a/scripts/verify-tff-mapping +++ b/scripts/verify-tff-mapping @@ -68,6 +68,15 @@ tests = [ ] }, + { + explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1987902951', + changed_file: 'ee/lib/audit_events/strategies/instance/amazon_s3_destination_strategy.rb', + expected: %w[ + ee/spec/lib/audit_events/strategies/instance/amazon_s3_destination_strategy_spec.rb + ee/spec/lib/audit_events/external_destination_streamer_spec.rb + ] + }, + { explanation: 'Tooling should map to respective spec', changed_file: 'tooling/danger/specs/project_factory_suggestion.rb', @@ -461,6 +470,52 @@ tests = [ ee/spec/requests/api/graphql/remote_development/workspace/with_id_arg_spec.rb ] }, + + { + explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1987834618', + changed_file: 'ee/app/replicators/geo/ci_secure_file_replicator.rb', + expected: %w[ + ee/spec/replicators/geo/ci_secure_file_replicator_spec.rb + ee/spec/models/geo_node_status_spec.rb + ] + }, + + # Why is it commented out? + # + # We cannot uncomment this, as this "spec" would fail as soon as we add/remove a file in + # the "spec/features" folder hierarchy that would contain the word navbar/sidebar. + # + # { + # explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1988359861', + # changed_file: 'lib/sidebars/projects/menus/issues_menu.rb', + # expected: %w[ + # spec/features/boards/sidebar_spec.rb + # spec/features/dashboard/navbar_spec.rb + # spec/features/explore/navbar_spec.rb + # spec/features/groups/navbar_spec.rb + # spec/features/projects/navbar_spec.rb + # spec/lib/sidebars/projects/menus/issues_menu_spec.rb + # ] + # }, + + # Why is it commented out? + # + # We cannot uncomment this, as this "spec" would fail as soon as we add/remove a file in + # the "spec/features" folder hierarchy that would contain the word navbar/sidebar. + # + # { + # explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1988359861', + # changed_file: 'ee/lib/sidebars/groups/menus/epics_menu.rb', + # expected: %w[ + # ee/spec/features/boards/sidebar_spec.rb + # ee/spec/features/dashboard/navbar_spec.rb + # ee/spec/features/groups/navbar_spec.rb + # ee/spec/features/merge_request/sidebar_spec.rb + # ee/spec/features/projects/navbar_spec.rb + # ee/spec/lib/sidebars/groups/menus/epics_menu_spec.rb + # ] + # }, + { explanation: 'Run database dictionary related specs on db/docs changes.', changed_file: 'db/docs/design_management_repositories.yml', diff --git a/tests.yml b/tests.yml index 6b228f78ba4438cfa43441528a680d76987e4b29..8e74693fb3bc1e411a27e564563d40482a3a50e9 100644 --- a/tests.yml +++ b/tests.yml @@ -29,6 +29,10 @@ mapping: - source: 'ee/lib/gitlab/ci/config/(?<rest>.+)\.rb' test: 'ee/spec/lib/gitlab/ci/yaml_processor_spec.rb' + # See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1987902951 + - source: 'ee/lib/audit_events/strategies/(?<rest>.+)\.rb' + test: 'ee/spec/lib/audit_events/external_destination_streamer_spec.rb' + # FOSS tooling should map to respective spec - source: 'tooling/(?<rest>.+)\.rb' test: 'spec/tooling/%{rest}_spec.rb' @@ -208,3 +212,13 @@ mapping: - source: 'public/robots\.txt' test: - 'spec/requests/robots_txt_spec.rb' + + # See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1987834618 + - source: 'ee/app/replicators/geo/(?<rest>.+)\.rb' + test: 'ee/spec/models/geo_node_status_spec.rb' + + # Any change to lib/sidebars/**/*.rb should map to specs that contain the words `sidebar` or `navbar` + # + # See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1988359861 + - source: '(?<prefix>ee/)?lib/sidebars/(?<rest>.+)\.rb' + test: '%{prefix}spec/features/**/{navbar,sidebar}_spec.rb'