Skip to content
Snippets Groups Projects
Unverified Commit b80c1d98 authored by David Dieulivol's avatar David Dieulivol Committed by GitLab
Browse files

Apply 1 suggestion(s) to 1 file(s)


Co-authored-by: default avatarLin Jen-Shin <jen-shin@gitlab.com>
parent 5bc1ec98
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -480,6 +480,78 @@ tests = [
]
},
 
{
explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2131393513',
changed_file: 'ee/app/policies/ee/group_policy.rb',
expected: %w[
spec/policies/group_policy_spec.rb
ee/spec/policies/group_policy_spec.rb
ee/spec/features/groups/groups_security_credentials_spec.rb
]
},
{
explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2132805842',
changed_file: 'lib/gitlab/ci/mask_secret.rb',
expected: %w[
ee/spec/lib/gitlab/ci/google_cloud/generate_build_environment_variables_service_spec.rb
ee/spec/models/dast_site_profile_spec.rb
ee/spec/models/ee/project_spec.rb
spec/features/admin_variables_spec.rb
spec/features/group_variables_spec.rb
spec/features/project_group_variables_spec.rb
spec/features/project_variables_spec.rb
spec/lib/expand_variables_spec.rb
spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb
spec/lib/gitlab/ci/config/external/file/artifact_spec.rb
spec/lib/gitlab/ci/config/external/file/base_spec.rb
spec/lib/gitlab/ci/config/external/file/local_spec.rb
spec/lib/gitlab/ci/config/external/file/project_spec.rb
spec/lib/gitlab/ci/config/external/file/remote_spec.rb
spec/lib/gitlab/ci/config/external/file/template_spec.rb
spec/lib/gitlab/ci/config/external/mapper/matcher_spec.rb
spec/lib/gitlab/ci/config/interpolation/functions/expand_vars_spec.rb
spec/lib/gitlab/ci/mask_secret_spec.rb
spec/lib/gitlab/ci/variables/collection/item_spec.rb
spec/models/ci/build_spec.rb
spec/models/clusters/kubernetes_namespace_spec.rb
spec/models/clusters/platforms/kubernetes_spec.rb
spec/models/integrations/apple_app_store_spec.rb
spec/models/integrations/diffblue_cover_spec.rb
spec/models/integrations/google_play_spec.rb
spec/models/integrations/harbor_spec.rb
spec/models/project_spec.rb
spec/requests/api/admin/ci/variables_spec.rb
spec/requests/api/ci/variables_spec.rb
spec/requests/api/graphql/ci/group_variables_spec.rb
spec/requests/api/graphql/ci/inherited_ci_variables_spec.rb
spec/requests/api/graphql/ci/instance_variables_spec.rb
spec/requests/api/graphql/ci/project_variables_spec.rb
spec/requests/api/group_variables_spec.rb
spec/services/ci/change_variable_service_spec.rb
spec/services/ci/create_pipeline_service/creation_errors_and_warnings_spec.rb
]
},
{
explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2132808426',
changed_file: 'lib/gitlab/ci/build/rules/rule/clause/changes.rb',
expected: %w[
spec/lib/gitlab/ci/build/rules/rule/clause/changes_spec.rb
spec/lib/gitlab/ci/build/rules/rule_spec.rb
spec/lib/gitlab/ci/config/external/rules_spec.rb
]
},
{
explanation: 'https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2138440847',
changed_file: 'app/services/merge_requests/mergeability/check_open_status_service.rb',
expected: %w[
ee/spec/graphql/ee/types/merge_request_type_spec.rb
spec/services/merge_requests/mergeability/check_open_status_service_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
Loading
Loading
@@ -516,6 +588,38 @@ tests = [
# ]
# },
 
# 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_1939569462',
# changed_file: 'lib/api/hooks/events.rb',
# expected: %w[
# ee/spec/requests/api/group_hooks_spec.rb
# ee/spec/requests/api/project_hooks_spec.rb
# spec/requests/api/project_hooks_spec.rb
# spec/requests/api/system_hooks_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_1939569462',
# changed_file: 'ee/lib/api/group_hooks.rb',
# expected: %w[
# ee/spec/requests/api/group_hooks_spec.rb
# ee/spec/requests/api/project_hooks_spec.rb
# spec/requests/api/project_hooks_spec.rb
# spec/requests/api/system_hooks_spec.rb
# ]
# },
{
explanation: 'Run database dictionary related specs on db/docs changes.',
changed_file: 'db/docs/design_management_repositories.yml',
Loading
Loading
Loading
Loading
@@ -222,3 +222,73 @@ mapping:
# 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'
# See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2131393513
- source: 'ee/app/policies/ee/group_policy\.rb'
test: 'ee/spec/features/groups/groups_security_credentials_spec.rb'
# Any change to lib/gitlab/ci/mask_secret.rb should trigger any spec relying on masking CI secrets
# The list below was computed by searching for the following terms:
#
# - `[MASKED]` in any `spec` folder
# - `masked: true` in any `spec` folder
#
# See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2132805842
- source: 'lib/gitlab/ci/mask_secret\.rb'
test:
- ee/spec/lib/gitlab/ci/google_cloud/generate_build_environment_variables_service_spec.rb
- ee/spec/models/dast_site_profile_spec.rb
- ee/spec/models/ee/project_spec.rb
- spec/features/admin_variables_spec.rb
- spec/features/group_variables_spec.rb
- spec/features/project_group_variables_spec.rb
- spec/features/project_variables_spec.rb
- spec/lib/expand_variables_spec.rb
- spec/lib/gitlab/ci/build/rules/rule/clause/exists_spec.rb
- spec/lib/gitlab/ci/config/external/file/artifact_spec.rb
- spec/lib/gitlab/ci/config/external/file/base_spec.rb
- spec/lib/gitlab/ci/config/external/file/local_spec.rb
- spec/lib/gitlab/ci/config/external/file/project_spec.rb
- spec/lib/gitlab/ci/config/external/file/remote_spec.rb
- spec/lib/gitlab/ci/config/external/file/template_spec.rb
- spec/lib/gitlab/ci/config/external/mapper/matcher_spec.rb
- spec/lib/gitlab/ci/config/interpolation/functions/expand_vars_spec.rb
- spec/lib/gitlab/ci/mask_secret_spec.rb
- spec/lib/gitlab/ci/variables/collection/item_spec.rb
- spec/models/ci/build_spec.rb
- spec/models/clusters/kubernetes_namespace_spec.rb
- spec/models/clusters/platforms/kubernetes_spec.rb
- spec/models/integrations/apple_app_store_spec.rb
- spec/models/integrations/diffblue_cover_spec.rb
- spec/models/integrations/google_play_spec.rb
- spec/models/integrations/harbor_spec.rb
- spec/models/project_spec.rb
- spec/requests/api/admin/ci/variables_spec.rb
- spec/requests/api/ci/variables_spec.rb
- spec/requests/api/graphql/ci/group_variables_spec.rb
- spec/requests/api/graphql/ci/inherited_ci_variables_spec.rb
- spec/requests/api/graphql/ci/instance_variables_spec.rb
- spec/requests/api/graphql/ci/project_variables_spec.rb
- spec/requests/api/group_variables_spec.rb
- spec/services/ci/change_variable_service_spec.rb
- spec/services/ci/create_pipeline_service/creation_errors_and_warnings_spec.rb
# See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2132808426
- source: 'lib/gitlab/ci/build/rules/(?<rest>.+)\.rb'
test:
- spec/lib/gitlab/ci/build/rules/rule_spec.rb
- spec/lib/gitlab/ci/config/external/rules_spec.rb
# See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_2138440847
- source: 'app/services/merge_requests/mergeability/(?<rest>.+)\.rb'
test: ee/spec/graphql/ee/types/merge_request_type_spec.rb
# Any change to the (ee/)lib/api/hooks folder, or any files in (ee/)lib/api/ with the `hook` substring in them
# should map to specs that contain the words `hook` in both {ee/,}spec/requests/api
#
# See https://gitlab.com/gitlab-org/gitlab/-/issues/466068#note_1939569462
- source:
- '(?<prefix>ee/)?lib/api/hooks/(?<rest>.+)\.rb'
- '(?<prefix>ee/)?lib/api/(?<rest>.+hook.+)\.rb'
test:
- '{ee/,}spec/requests/api/**/*hook*_spec.rb'
Loading
Loading
@@ -15,7 +15,7 @@ def initialize(changed_files_pathname, predictive_tests_pathname)
def execute
tff = TestFileFinder::FileFinder.new(paths: changed_files).tap do |file_finder|
if ENV['RSPEC_TESTS_MAPPING_ENABLED'] == 'true'
# Run 50% of the predictive backend tests for any file changed, with a minimum of 20 backend test files.
# Run 50% of the predictive backend tests for any file changed, with a minimum of 14 backend test files.
#
# See https://gitlab.com/gitlab-org/gitlab/-/issues/450374#note_1836131381
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment