Commit 73a5e1cf authored by Grzegorz Bizon's avatar Grzegorz Bizon

Expand CI regular expressions validation message

parent 492e543a
......@@ -245,7 +245,7 @@ module Gitlab
private
def validation_message
'should be an array of strings or regexps using re2 syntax'
'should be an array of strings or regular expressions using re2 syntax'
end
def validate_array_of_strings_or_regexps(values)
......@@ -270,7 +270,7 @@ module Gitlab
#
def validation_message
if ::Feature.enabled?(:allow_unsafe_ruby_regexp, default_enabled: :yaml)
'should be an array of strings or regexps'
'should be an array of strings or regular expressions'
else
super
end
......
......@@ -88,7 +88,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Policy do
describe '#errors' do
it 'saves errors' do
expect(entry.errors)
.to include /policy config should be an array of strings or regexps/
.to include /policy config should be an array of strings or regular expressions/
end
end
end
......
......@@ -613,13 +613,13 @@ module Gitlab
context 'when it is an array of integers' do
let(:only) { [1, 1] }
it_behaves_like 'returns errors', 'jobs:rspec:only config should be an array of strings or regexps using re2 syntax'
it_behaves_like 'returns errors', 'jobs:rspec:only config should be an array of strings or regular expressions using re2 syntax'
end
context 'when it is invalid regex' do
let(:only) { ["/*invalid/"] }
it_behaves_like 'returns errors', 'jobs:rspec:only config should be an array of strings or regexps using re2 syntax'
it_behaves_like 'returns errors', 'jobs:rspec:only config should be an array of strings or regular expressions using re2 syntax'
end
end
......@@ -637,13 +637,13 @@ module Gitlab
context 'when it is an array of integers' do
let(:except) { [1, 1] }
it_behaves_like 'returns errors', 'jobs:rspec:except config should be an array of strings or regexps using re2 syntax'
it_behaves_like 'returns errors', 'jobs:rspec:except config should be an array of strings or regular expressions using re2 syntax'
end
context 'when it is invalid regex' do
let(:except) { ["/*invalid/"] }
it_behaves_like 'returns errors', 'jobs:rspec:except config should be an array of strings or regexps using re2 syntax'
it_behaves_like 'returns errors', 'jobs:rspec:except config should be an array of strings or regular expressions using re2 syntax'
end
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