Commit ee58b86a authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'fix-test-level-level_for-to-strictly-respect-prefix' into 'master'

tooling: Add test for TestLevel#level_for with no prefix for an EE-file

See merge request gitlab-org/gitlab!48130
parents d194865e 5785a22d
...@@ -174,6 +174,10 @@ RSpec.describe Quality::TestLevel do ...@@ -174,6 +174,10 @@ RSpec.describe Quality::TestLevel do
expect(subject.level_for('spec/lib/gitlab/background_migration/archive_legacy_traces_spec.rb')).to eq(:migration) expect(subject.level_for('spec/lib/gitlab/background_migration/archive_legacy_traces_spec.rb')).to eq(:migration)
end end
it 'returns the correct level for an EE file without passing a prefix' do
expect(subject.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 geo migration test' do it 'returns the correct level for a geo migration test' do
expect(described_class.new('ee/').level_for('ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb')).to eq(:migration) expect(described_class.new('ee/').level_for('ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb')).to eq(:migration)
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment