Commit 2efc195f authored by Markus Frosch's avatar Markus Frosch 📣

spec: Don't try to raise error for string/integer conversion

Puppet 3 is handling integer -> string really soft, so a integer is actually a valid string.

The check is not productive either way, so let's get rid of it.
parent d368b4a7
......@@ -209,13 +209,6 @@ describe('icinga2::feature::api', :type => :class) do
end
context "#{os} with ca_host => 4247 (not a valid string)" do
let(:params) { {:pki => 'icinga2', :ca_host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with pki => 'icinga2', ca_port => 1234" do
let(:params) { {:pki => 'icinga2',:ca_port => '1234'} }
......@@ -240,13 +233,6 @@ describe('icinga2::feature::api', :type => :class) do
end
context "#{os} with ticket_salt => 4247 (not a valid string)" do
let(:params) { {:ticket_salt => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with endpoints => { foo => {} }" do
let(:params) { {:endpoints => { 'foo' => {}} }}
......@@ -507,13 +493,6 @@ describe('icinga2::feature::api', :type => :class) do
end
context "Windows 2012 R2 with ca_host => 4247 (not a valid string)" do
let(:params) { {:pki => 'icinga2', :ca_host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with pki => 'icinga2', ca_port => 1234" do
let(:params) { {:pki => 'icinga2',:ca_port => '1234'} }
......@@ -529,13 +508,6 @@ describe('icinga2::feature::api', :type => :class) do
end
context "Windows 2012 R2 with ticket_salt => 4247 (not a valid string)" do
let(:params) { {:ticket_salt => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with endpoints => { foo => {} }" do
let(:params) { {:endpoints => { 'foo' => {}} }}
......
......@@ -26,20 +26,6 @@ describe('icinga2::pki::ca', :type => :class) do
it { is_expected.to contain_file(@ca_cert).with_content(/foo/) }
it { is_expected.to contain_file(@ca_key).with_content(/bar/) }
end
context "#{os} with ca_cert => 4247, ca_key => 'bar' (not a valid string)" do
let(:params) { {:ca_cert => 4247, :ca_key => 'bar'} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with ca_cert => 'foo', ca_key => 4247 (not a valid string)" do
let(:params) { {:ca_cert => 'foo', :ca_key => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
end
end
......@@ -81,21 +67,6 @@ describe('icinga2::pki::ca', :type => :class) do
it { is_expected.to contain_file(@ca_cert).with_content(/foo/) }
it { is_expected.to contain_file(@ca_key).with_content(/bar/) }
end
context "Windows 2012 R2 with ca_cert => 4247, ca_key => 'bar' (not a valid string)" do
let(:params) { {:ca_cert => 4247, :ca_key => 'bar'} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with ca_cert => 'foo', ca_key => 4247 (not a valid string)" do
let(:params) { {:ca_cert => 'foo', :ca_key => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
end
......
......@@ -43,13 +43,6 @@ describe('icinga2::feature::gelf', :type => :class) do
end
context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -84,13 +77,6 @@ describe('icinga2::feature::gelf', :type => :class) do
end
context "#{os} with source => 4247 (not a valid string)" do
let(:params) { {:source => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enable_send_perfdata => true" do
let(:params) { {:enable_send_perfdata => true} }
......@@ -174,13 +160,6 @@ describe('icinga2::feature::gelf', :type => :class) do
end
context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -199,13 +178,6 @@ describe('icinga2::feature::gelf', :type => :class) do
end
context "Windows 2012 R2 with source => 4247 (not a valid string)" do
let(:params) { {:source => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context 'Windows 2012 R2 with source => foo' do
let(:params) { {:source => 'foo'} }
......@@ -215,13 +187,6 @@ describe('icinga2::feature::gelf', :type => :class) do
end
context 'Windows 2012 R2 with source => 4247 (not a valid string)' do
let(:params) { {:source => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enable_send_perfdata => true" do
let(:params) { {:enable_send_perfdata => true} }
......
......@@ -46,13 +46,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -87,13 +80,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "#{os} with host_name_template => 4247 (not a valid string)" do
let(:params) { {:host_name_template => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with service_name_template => foo" do
let(:params) { {:service_name_template => 'foo'} }
......@@ -103,13 +89,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "#{os} with service_name_template => foo (not a valid string)" do
let(:params) { {:service_name_template => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enable_send_thresholds => true" do
let(:params) { {:enable_send_thresholds => true} }
......@@ -220,13 +199,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -261,13 +233,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "Windows 2012 R2 with host_name_template => foo (not a valid string)" do
let(:params) { {:host_name_template => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with service_name_template => foo" do
let(:params) { {:service_name_template => 'foo'} }
......@@ -277,13 +242,6 @@ describe('icinga2::feature::graphite', :type => :class) do
end
context "Windows 2012 R2 with service_name_template => foo (not a valid string)" do
let(:params) { {:service_name_template => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enable_send_thresholds => true" do
let(:params) { {:enable_send_thresholds => true} }
......
......@@ -45,13 +45,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -102,13 +95,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with user => 4247 (not a valid string)" do
let(:params) { {:user => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with database => foo" do
let(:params) { {:database => 'foo'} }
......@@ -118,13 +104,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with database => 4247 (not a valid string)" do
let(:params) { {:database => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enable_ssl => false" do
let(:params) { {:enable_ssl => false} }
......@@ -226,13 +205,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with enabl_ssl = true, pki = none, ssl_cipher = foo" do
let(:params) { {:enable_ssl => true,:pki => 'none', :ssl_cipher => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enabl_ssl = true, pki = none, ssl_capath = /foo" do
let(:params) { {:enable_ssl => true,:pki => 'none', :ssl_capath => '/foo'} }
......@@ -259,13 +231,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with table_prefix => 4247 (not a valid string)" do
let(:params) { {:table_prefix => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with instance_name => foo" do
let(:params) { {:instance_name => 'foo'} }
......@@ -275,13 +240,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "#{os} with instance_name => 4247 (not a valid string)" do
let(:params) { {:instance_name => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enable_ha => true" do
let(:params) { {:enable_ha => true} }
......@@ -427,14 +385,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -486,13 +436,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with user => 4247 (not a valid string)" do
let(:params) { {:user => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with database => foo" do
let(:params) { {:database => 'foo'} }
......@@ -502,13 +445,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with database => 4247 (not a valid string)" do
let(:params) { {:database => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enable_ssl => false" do
let(:params) { {:enable_ssl => false} }
......@@ -608,13 +544,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with enabl_ssl = true, pki = none, ssl_cipher = foo" do
let(:params) { {:enable_ssl => true,:pki => 'none', :ssl_cipher => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enabl_ssl = true, pki = none, ssl_capath = /foo" do
let(:params) { {:enable_ssl => true,:pki => 'none', :ssl_capath => '/foo'} }
......@@ -641,13 +570,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with table_prefix => 4247 (not a valid string)" do
let(:params) { {:table_prefix => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with instance_name => foo" do
let(:params) { {:instance_name => 'foo'} }
......@@ -657,13 +579,6 @@ describe('icinga2::feature::idomysql', :type => :class) do
end
context "Windows 2012 R2 with instance_name => 4247 (not a valid string)" do
let(:params) { {:instance_name => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enable_ha => true" do
let(:params) { {:enable_ha => true} }
......
......@@ -40,13 +40,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -81,13 +74,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "#{os} with user => 4247 (not a valid string)" do
let(:params) { {:user => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with database => foo" do
let(:params) { {:database => 'foo'} }
......@@ -97,13 +83,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "#{os} with database => 4247 (not a valid string)" do
let(:params) { {:database => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with table_prefix => foo" do
let(:params) { {:table_prefix => 'foo'} }
......@@ -113,13 +92,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "#{os} with table_prefix => 4247 (not a valid string)" do
let(:params) { {:table_prefix => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with instance_name => foo" do
let(:params) { {:instance_name => 'foo'} }
......@@ -129,13 +101,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "#{os} with instance_name => 4247 (not a valid string)" do
let(:params) { {:instance_name => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with enable_ha => true" do
let(:params) { {:enable_ha => true} }
......@@ -277,13 +242,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -318,13 +276,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "Windows 2012 R2 with user => 4247 (not a valid string)" do
let(:params) { {:user => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with database => foo" do
let(:params) { {:database => 'foo'} }
......@@ -334,13 +285,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "Windows 2012 R2 with database => 4247 (not a valid string)" do
let(:params) { {:database => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with table_prefix => foo" do
let(:params) { {:table_prefix => 'foo'} }
......@@ -350,13 +294,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "Windows 2012 R2 with table_prefix => 4247 (not a valid string)" do
let(:params) { {:table_prefix => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with instance_name => foo" do
let(:params) { {:instance_name => 'foo'} }
......@@ -366,13 +303,6 @@ describe('icinga2::feature::idopgsql', :type => :class) do
end
context "Windows 2012 R2 with instance_name => 4247 (not a valid string)" do
let(:params) { {:instance_name => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with enable_ha => true" do
let(:params) { {:enable_ha => true} }
......
......@@ -49,13 +49,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "#{os} with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -90,13 +83,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with database => 123 (not a valid string)" do
let(:params) { {:database => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "#{os} with username => foo" do
let(:params) { {:username => 'foo'} }
......@@ -106,12 +92,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with username => 123 (not a valid string)" do
let(:params) { {:username => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "#{os} with password => foo" do
let(:params) { {:password => 'foo'} }
......@@ -121,13 +101,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with password => 123 (not a valid string)" do
let(:params) { {:password => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "#{os} with enable_ssl => false" do
let(:params) { {:enable_ssl => false} }
......@@ -229,13 +202,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with host_measurement => 123 (not a valid string)" do
let(:params) { {:host_measurement => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "#{os} with host_tags => { foo => 'bar', bar => 'foo' }" do
let(:params) { {:host_tags => { 'foo' => "bar", 'bar' => "foo" } } }
......@@ -261,13 +227,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "#{os} with service_measurement => 123 (not a valid string)" do
let(:params) { {:service_measurement => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "#{os} with service_tags => { foo => 'bar', bar => 'foo' }" do
let(:params) { {:service_tags => { 'foo' => "bar", 'bar' => "foo" } } }
......@@ -429,13 +388,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "Windows 2012 R2 with host => 4247" do
let(:params) { {:host => 4247} }
it { is_expected.to raise_error(Puppet::Error, /4247 is not a string/) }
end
context "Windows 2012 R2 with host => foo.example.com" do
let(:params) { {:host => 'foo.example.com'} }
......@@ -470,13 +422,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "Windows 2012 R2 with database => 123 (not a valid string)" do
let(:params) { {:database => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "Windows 2012 R2 with username => foo" do
let(:params) { {:username => 'foo'} }
......@@ -486,12 +431,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "Windows 2012 R2 with username => 123 (not a valid string)" do
let(:params) { {:username => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "Windows 2012 R2 with password => foo" do
let(:params) { {:password => 'foo'} }
......@@ -501,13 +440,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "Windows 2012 R2 with password => 123 (not a valid string)" do
let(:params) { {:password => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "Windows 2012 R2 with enable_ssl => false" do
let(:params) { {:enable_ssl => false} }
......@@ -608,13 +540,6 @@ describe('icinga2::feature::influxdb', :type => :class) do
end
context "Windows 2012 R2 with host_measurement => 123 (not a valid string)" do
let(:params) { {:host_measurement => 123} }
it { is_expected.to raise_error(Puppet::Error, /123 is not a string/) }
end
context "Windows 2012 R2 with host_tags => { foo => 'bar', ba