mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-28 14:06:05 +10:00
Remove duplicated exception in Ci config
This is a temporary refactoring stub, that is planned to be removed after removing legacy config processor.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user