diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 03:09:07 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 03:09:07 +0000 |
commit | d393deba773bb1fab09273850fe5d5986066d76d (patch) | |
tree | b08d599196d09a91561f6f43b9c5660987060ecb /spec/lib/quality | |
parent | 32fd4cd5e2134511936899d6bcc4aaf18b9be6fd (diff) | |
download | gitlab-ce-d393deba773bb1fab09273850fe5d5986066d76d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/quality')
-rw-r--r-- | spec/lib/quality/test_level_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/lib/quality/test_level_spec.rb b/spec/lib/quality/test_level_spec.rb index 757a003946b..34163c6cfbc 100644 --- a/spec/lib/quality/test_level_spec.rb +++ b/spec/lib/quality/test_level_spec.rb @@ -28,7 +28,7 @@ RSpec.describe Quality::TestLevel do context 'when level is migration' do it 'returns a pattern' do expect(subject.pattern(:migration)) - .to eq("spec/{migrations,lib/gitlab/background_migration}{,/**/}*_spec.rb") + .to eq("spec/{migrations,lib/gitlab/background_migration,lib/ee/gitlab/background_migration}{,/**/}*_spec.rb") end end @@ -89,7 +89,7 @@ RSpec.describe Quality::TestLevel do context 'when level is migration' do it 'returns a regexp' do expect(subject.regexp(:migration)) - .to eq(%r{spec/(migrations|lib/gitlab/background_migration)}) + .to eq(%r{spec/(migrations|lib/gitlab/background_migration|lib/ee/gitlab/background_migration)}) end end @@ -134,7 +134,7 @@ RSpec.describe Quality::TestLevel do expect(subject.level_for('spec/migrations/add_default_and_free_plans_spec.rb')).to eq(:migration) end - it 'returns the correct level for a background_migration test' do + it 'returns the correct level for a background migration test' do expect(subject.level_for('spec/lib/gitlab/background_migration/archive_legacy_traces_spec.rb')).to eq(:migration) end @@ -142,6 +142,10 @@ RSpec.describe Quality::TestLevel do expect(described_class.new('ee/').level_for('ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb')).to eq(:migration) end + it 'returns the correct level for a EE-namespaced background migration test' do + expect(described_class.new('ee/').level_for('ee/spec/lib/ee/gitlab/background_migration/prune_orphaned_geo_events_spec.rb')).to eq(:migration) + end + it 'returns the correct level for an integration test' do expect(subject.level_for('spec/mailers/abuse_report_mailer_spec.rb')).to eq(:integration) end |