diff --git a/spec/lib/gitlab/path_regex_spec.rb b/spec/lib/gitlab/path_regex_spec.rb index 8dabe5a756b9b96885d6bd843a9c48b89f1cf121..50b045c6aad47bdb388c08f34d7e31c01b5e7a5f 100644 --- a/spec/lib/gitlab/path_regex_spec.rb +++ b/spec/lib/gitlab/path_regex_spec.rb @@ -170,6 +170,11 @@ def failure_message(constant_name, migration_helper, missing_words: [], addition expect(described_class::TOP_LEVEL_ROUTES) .to contain_exactly(*top_level_words), failure_block end + + # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362 + it 'does not allow expansion' do + expect(described_class::TOP_LEVEL_ROUTES.size).to eq(41) + end end describe 'GROUP_ROUTES' do @@ -184,6 +189,11 @@ def failure_message(constant_name, migration_helper, missing_words: [], addition expect(described_class::GROUP_ROUTES) .to contain_exactly(*paths_after_group_id), failure_block end + + # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362 + it 'does not allow expansion' do + expect(described_class::GROUP_ROUTES.size).to eq(1) + end end describe 'PROJECT_WILDCARD_ROUTES' do @@ -195,6 +205,11 @@ def failure_message(constant_name, migration_helper, missing_words: [], addition end end end + + # We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362 + it 'does not allow expansion' do + expect(described_class::PROJECT_WILDCARD_ROUTES.size).to eq(21) + end end describe '.root_namespace_route_regex' do