Commit ce82197a authored by Rob Browning's avatar Rob Browning

(PDB-2952) fix failing spec tests for ruby 2.2

Ruby 2.2 as changed URI validation to allow underscores, which we were using in
tests as example invalid URLs. This just changes those tests to use # instead.
parent 20f415cf
...@@ -181,34 +181,34 @@ CONF ...@@ -181,34 +181,34 @@ CONF
it "should fail if given an invalid hostname" do it "should fail if given an invalid hostname" do
write_config <<CONF write_config <<CONF
[main] [main]
server_urls = https://invalid_host_name.com server_urls = https://invalid#host#name.com
CONF CONF
expect do expect do
config = described_class.load config = described_class.load
end.to raise_error(/Error parsing URL 'https:\/\/invalid_host_name.com' in PuppetDB 'server_urls'/) end.to raise_error(/Error parsing URL 'https:\/\/invalid#host#name.com' in PuppetDB 'server_urls'/)
end end
it "should fail if given an unparsable second URI" do it "should fail if given an unparsable second URI" do
write_config <<CONF write_config <<CONF
[main] [main]
server_urls = https://foo.com,https://invalid_host_name.com server_urls = https://foo.com,https://invalid#host#name.com
CONF CONF
expect do expect do
config = described_class.load config = described_class.load
end.to raise_error(/Error parsing URL 'https:\/\/invalid_host_name.com' in PuppetDB 'server_urls'/) end.to raise_error(/Error parsing URL 'https:\/\/invalid#host#name.com' in PuppetDB 'server_urls'/)
end end
it "should fail if given an unparsable second URI" do it "should fail if given an unparsable second URI" do
write_config <<CONF write_config <<CONF
[main] [main]
server_urls = https://foo.com,https://invalid_host_name.com server_urls = https://foo.com,https://invalid#host#name.com
CONF CONF
expect do expect do
config = described_class.load config = described_class.load
end.to raise_error(/Error parsing URL 'https:\/\/invalid_host_name.com' in PuppetDB 'server_urls'/) end.to raise_error(/Error parsing URL 'https:\/\/invalid#host#name.com' in PuppetDB 'server_urls'/)
end end
it "should tolerate spaces between URLs" do it "should tolerate spaces between URLs" do
......
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