Commit fa097c67 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove duplicated exception in Ci config

This is a temporary refactoring stub, that is planned to be removed
after removing legacy config processor.
parent 23030439
...@@ -18,7 +18,7 @@ module Ci ...@@ -18,7 +18,7 @@ module Ci
initial_parsing initial_parsing
validate! validate!
rescue Gitlab::Ci::Config::LoaderError => e rescue Gitlab::Ci::Config::Loader::FormatError => e
raise ValidationError, e.message raise ValidationError, e.message
end end
......
...@@ -5,11 +5,6 @@ module Gitlab ...@@ -5,11 +5,6 @@ module Gitlab
def initialize(config) def initialize(config)
loader = Loader.new(config) loader = Loader.new(config)
unless loader.valid?
raise LoaderError, 'Invalid configuration format!'
end
@config = loader.load @config = loader.load
end end
......
...@@ -37,7 +37,8 @@ describe Gitlab::Ci::Config do ...@@ -37,7 +37,8 @@ describe Gitlab::Ci::Config do
describe '.new' do describe '.new' do
it 'raises error' do it 'raises error' do
expect { config }.to raise_error( expect { config }.to raise_error(
Gitlab::Ci::Config::LoaderError, /Invalid configuration format/ Gitlab::Ci::Config::Loader::FormatError,
/Invalid configuration format/
) )
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