Skip to content

Commit 6e155bb

Browse files
committed
(maint) remove redundant validation
The same checks are already done in BaseTypeDefinition.validate_schema
1 parent d249941 commit 6e155bb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/puppet/resource_api/transport.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ module Puppet::ResourceApi; end # rubocop:disable Style/Documentation
33
# Remote target transport API
44
module Puppet::ResourceApi::Transport
55
def register(schema)
6-
raise Puppet::DevError, 'requires a hash as schema, not `%{other_type}`' % { other_type: schema.class } unless schema.is_a? Hash
7-
raise Puppet::DevError, 'requires a `:name`' unless schema.key? :name
8-
raise Puppet::DevError, 'requires `:desc`' unless schema.key? :desc
9-
raise Puppet::DevError, 'requires `:connection_info`' unless schema.key? :connection_info
10-
raise Puppet::DevError, '`:connection_info` must be a hash, not `%{other_type}`' % { other_type: schema[:connection_info].class } unless schema[:connection_info].is_a?(Hash)
11-
126
unless transports[schema[:name]].nil?
137
raise Puppet::DevError, 'Transport `%{name}` is already registered for `%{environment}`' % {
148
name: schema[:name],

0 commit comments

Comments
 (0)