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

Expand CI regular expressions validation message

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