Commit 1fda4d01 authored by Markus Frosch's avatar Markus Frosch 📣

spec: Fix error match for validate_array

parent 2efc195f
......@@ -194,7 +194,7 @@ describe('icinga2::object::dependency', :type => :define) do
:parent_host_name => 'parentfoo',
:child_host_name => 'childfoo'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
end
......@@ -406,6 +406,6 @@ describe('icinga2::object::dependency', :type => :define) do
:parent_host_name => 'parentfoo',
:child_host_name => 'childfoo'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
......@@ -43,7 +43,7 @@ describe('icinga2::object::host', :type => :define) do
context "#{os} with import => foo (not a valid array)" do
let(:params) { {:import => 'foo', :target => '/bar/baz', :check_command => 'foocommand'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -86,7 +86,7 @@ describe('icinga2::object::host', :type => :define) do
context "#{os} with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz', :check_command => 'foocommand'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -505,7 +505,7 @@ describe('icinga2::object::host', :type => :define) do
context "Windows 2012 R2 with import => foo (not a valid array)" do
let(:params) { {:import => 'foo', :target => '/bar/baz', :check_command => 'foocommand'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -548,7 +548,7 @@ describe('icinga2::object::host', :type => :define) do
context "Windows 2012 R2 with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz', :check_command => 'foocommand'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......
......@@ -49,7 +49,7 @@ describe('icinga2::object::hostgroup', :type => :define) do
context "#{os} with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -121,7 +121,7 @@ describe('icinga2::object::hostgroup', :type => :define) do
context "Windows 2012 R2 with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......
......@@ -81,7 +81,7 @@ describe('icinga2::object::notification', :type => :define) do
context "#{os} with users => foo (not a valid array)" do
let(:params) { {:users => 'foo', :target => '/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -97,7 +97,7 @@ describe('icinga2::object::notification', :type => :define) do
context "#{os} with user_groups => foo (not a valid array)" do
let(:params) { {:user_groups => 'foo', :target => '/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -172,7 +172,7 @@ describe('icinga2::object::notification', :type => :define) do
context "#{os} with types => foo (not a valid array)" do
let(:params) { {:types => 'foo', :target => '/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -188,7 +188,7 @@ describe('icinga2::object::notification', :type => :define) do
context "#{os} with states => foo (not a valid array)" do
let(:params) { {:states => 'foo', :target => '/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
context "#{os} with assign => [] and ignore => [ foo ]" do
......@@ -293,7 +293,7 @@ describe('icinga2::object::notification', :type => :define) do
context "Windows 2012 R2 with users => foo (not a valid array)" do
let(:params) { {:users => 'foo', :target => 'C:/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -309,7 +309,7 @@ describe('icinga2::object::notification', :type => :define) do
context "Windows 2012 R2 with user_groups => foo (not a valid array)" do
let(:params) { {:user_groups => 'foo', :target => 'C:/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -384,7 +384,7 @@ describe('icinga2::object::notification', :type => :define) do
context "Windows 2012 R2 with types => foo (not a valid array)" do
let(:params) { {:types => 'foo', :target => 'C:/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -400,7 +400,7 @@ describe('icinga2::object::notification', :type => :define) do
context "Windows 2012 R2 with states => foo (not a valid array)" do
let(:params) { {:states => 'foo', :target => 'C:/bar/baz', :host_name => 'foohost'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
context "Windows 2012 R2 with assign => [] and ignore => [ foo ]" do
......
......@@ -77,7 +77,7 @@ describe('icinga2::object::service', :type => :define) do
:host_name => 'hostfoo',
:check_command => 'commandfoo'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
context "#{os} with vars => { foo => 'bar', bar => 'foo' }" do
......@@ -525,7 +525,7 @@ describe('icinga2::object::service', :type => :define) do
:host_name => 'hostfoo',
:check_command => 'commandfoo'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
context "Windows 2012 R2 with vars => { foo => 'bar', bar => 'foo' }" do
......
......@@ -57,7 +57,7 @@ describe('icinga2::object::servicegroup', :type => :define) do
context "#{os} with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
end
......@@ -132,6 +132,6 @@ describe('icinga2::object::servicegroup', :type => :define) do
context "Windows 2012 R2 with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
......@@ -89,7 +89,7 @@ describe('icinga2::object::timeperiod', :type => :define) do
context "#{os} with excludes => foo (not a valid array)" do
let(:params) { {:excludes => 'foo', :target => '/bar/baz', :ranges => { 'foo' => "bar", 'bar' => "foo"} }}
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -105,7 +105,7 @@ describe('icinga2::object::timeperiod', :type => :define) do
context "#{os} with includes => foo (not a valid array)" do
let(:params) { {:includes => 'foo', :target => '/bar/baz', :ranges => { 'foo' => "bar", 'bar' => "foo"} }}
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
end
......@@ -211,7 +211,7 @@ describe('icinga2::object::TimePeriod', :type => :define) do
context "Windows 2012 R2 with excludes => foo (not a valid array)" do
let(:params) { {:excludes => 'foo', :target => 'C:/bar/baz', :ranges => { 'foo' => "bar", 'bar' => "foo"} }}
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -227,7 +227,7 @@ describe('icinga2::object::TimePeriod', :type => :define) do
context "Windows 2012 R2 with includes => foo (not a valid array)" do
let(:params) { {:includes => 'foo', :target => 'C:/bar/baz', :ranges => { 'foo' => "bar", 'bar' => "foo"} }}
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
......@@ -91,7 +91,7 @@ describe('icinga2::object::user', :type => :define) do
context "#{os} with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -132,7 +132,7 @@ describe('icinga2::object::user', :type => :define) do
context "#{os} with types => foo (not a valid array)" do
let(:params) { {:types => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -148,7 +148,7 @@ describe('icinga2::object::user', :type => :define) do
context "#{os} with states => foo (not a valid array)" do
let(:params) { {:states => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
end
......@@ -256,7 +256,7 @@ describe('icinga2::object::user', :type => :define) do
context "Windows 2012 R2 with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -297,7 +297,7 @@ describe('icinga2::object::user', :type => :define) do
context "Windows 2012 R2 with types => foo (not a valid array)" do
let(:params) { {:types => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -313,7 +313,7 @@ describe('icinga2::object::user', :type => :define) do
context "Windows 2012 R2 with states => foo (not a valid array)" do
let(:params) { {:states => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
end
......@@ -57,7 +57,7 @@ describe('icinga2::object::usergroup', :type => :define) do
context "#{os} with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -138,7 +138,7 @@ describe('icinga2::object::usergroup', :type => :define) do
context "Windows 2012 R2 with groups => foo (not a valid array)" do
let(:params) { {:groups => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......
......@@ -57,7 +57,7 @@ describe('icinga2::object::zone', :type => :define) do
context "#{os} with endpoints => foo (not a valid array)" do
let(:params) { {:endpoints => 'foo', :target => '/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......@@ -153,7 +153,7 @@ describe('icinga2::object::zone', :type => :define) do
context "Windows 2012 R2 with endpoints => foo (not a valid array)" do
let(:params) { {:endpoints => 'foo', :target => 'C:/bar/baz'} }
it { is_expected.to raise_error(Puppet::Error, / "foo" is not an Array/) }
it { is_expected.to raise_error(Puppet::Error, /"foo" is not an Array/) }
end
......
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