diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /tooling/quality | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'tooling/quality')
-rw-r--r-- | tooling/quality/test_level.rb | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/tooling/quality/test_level.rb b/tooling/quality/test_level.rb index 29da7dddd03..31196290de4 100644 --- a/tooling/quality/test_level.rb +++ b/tooling/quality/test_level.rb @@ -83,9 +83,12 @@ module Quality def level_for(file_path) case file_path - # Detect migration first since some background migration tests are under - # spec/lib/gitlab/background_migration and tests under spec/lib are unit by default - when regexp(:migration), regexp(:background_migration) + # Detect background migration first since some are under + # spec/lib/gitlab/background_migration + # and tests under spec/lib are unit by default + when regexp(:background_migration) + :background_migration + when regexp(:migration) :migration # Detect frontend fixture before matching other unit tests when regexp(:frontend_fixture) @@ -101,10 +104,6 @@ module Quality end end - def background_migration?(file_path) - !!(file_path =~ regexp(:background_migration)) - end - private def prefixes_for_pattern @@ -130,14 +129,8 @@ module Quality end end - def migration_and_background_migration_folders - TEST_LEVEL_FOLDERS.fetch(:migration) + TEST_LEVEL_FOLDERS.fetch(:background_migration) - end - def folders_pattern(level) case level - when :migration - "{#{migration_and_background_migration_folders.join(',')}}" when :all '**' else @@ -147,8 +140,6 @@ module Quality def folders_regex(level) case level - when :migration - "(#{migration_and_background_migration_folders.join('|')})/" when :all '' else |