Skip to content

Commit

Permalink
Removing this check again as it breaks postgres datasource definition
Browse files Browse the repository at this point in the history
Removed this explicitly in commit d7e1991 but the check was readded...
  • Loading branch information
Faffnir authored and [email protected] committed Apr 2, 2018
1 parent 38882fe commit a984c1d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
8 changes: 1 addition & 7 deletions lib/puppet/type/grafana_datasource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@
end

newproperty(:url) do
desc 'The URL of the datasource'

validate do |value|
unless value =~ %r{^https?://}
raise ArgumentError, format('%s is not a valid URL', value)
end
end
desc 'The URL/Endpoint of the datasource'
end

newproperty(:type) do
Expand Down
6 changes: 0 additions & 6 deletions spec/unit/puppet/type/grafana_datasource_type_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@
end.to raise_error(Puppet::Error, %r{not a valid URL})
end

it "fails if url isn't HTTP-based" do
expect do
described_class.new name: 'foo', url: 'example.com', content: '{}', ensure: :present
end.to raise_error(Puppet::Error, %r{not a valid URL})
end

it "fails if json_data isn't valid" do
expect do
described_class.new name: 'foo', grafana_url: 'http://example.com', json_data: 'invalid', ensure: :present
Expand Down

0 comments on commit a984c1d

Please sign in to comment.