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
initial_parsing
validate!
rescue Gitlab::Ci::Config::LoaderError => e
rescue Gitlab::Ci::Config::Loader::FormatError => e
raise ValidationError, e.message
end
......
......@@ -5,11 +5,6 @@ module Gitlab
def initialize(config)
loader = Loader.new(config)
unless loader.valid?
raise LoaderError, 'Invalid configuration format!'
end
@config = loader.load
end
......
......@@ -37,7 +37,8 @@ describe Gitlab::Ci::Config do
describe '.new' do
it 'raises error' do
expect { config }.to raise_error(
Gitlab::Ci::Config::LoaderError, /Invalid configuration format/
Gitlab::Ci::Config::Loader::FormatError,
/Invalid configuration format/
)
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