Issue #4020 has been updated by James Turnbull.
Status changed from In Topic Branch Pending Merge to Tests Insufficient
Brian - the tests need some work after reviewing the patch. Currently the
nagios_maker_spec.rb tests for this patch:
<pre>
.....FFF.....
Failures:
1) Puppet::Util::NagiosMaker should create a property for all non-namevar
parameters
Failure/Error: @type.expects(:newproperty).with(:two)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:type>.newproperty(:two)
- expected exactly once, not yet invoked: #<Mock:type>.newproperty(:one)
satisfied expectations:
- allowed any number of times, not yet invoked:
Signal.trap(any_parameters)
- allowed any number of times, invoked once: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked 3 times: #<Mock:nagios
type>.namevar(any_parameters)
- allowed any number of times, not yet invoked: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked once: .type(:test)
- allowed any number of times, invoked once:
#<Mock:provider>.nagios_type(any_parameters)
- expected exactly once, invoked once: #<Mock:type>.newproperty(:target)
- allowed any number of times, invoked once:
#<Mock:type>.ensurable(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.provide(any_parameters)
- allowed any number of times, invoked twice:
#<Mock:type>.newproperty(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.desc(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.newparam(any_parameters)
- expected exactly once, invoked once: Puppet::Type.newtype(:nagios_test)
# ./nagios_maker_spec.rb:50
2) Puppet::Util::NagiosMaker should skip parameters that start with integers
Failure/Error: @type.expects(:newproperty).with(:other)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked:
#<Mock:type>.newproperty(:other)
satisfied expectations:
- allowed any number of times, not yet invoked:
Signal.trap(any_parameters)
- allowed any number of times, invoked once: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked 3 times: #<Mock:nagios
type>.namevar(any_parameters)
- allowed any number of times, not yet invoked: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked once: .type(:test)
- allowed any number of times, invoked once:
#<Mock:provider>.nagios_type(any_parameters)
- expected exactly once, invoked once: #<Mock:type>.newproperty(:target)
- allowed any number of times, invoked once:
#<Mock:type>.ensurable(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.provide(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.newproperty(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.desc(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.newparam(any_parameters)
- expected exactly once, invoked once: Puppet::Type.newtype(:nagios_test)
# ./nagios_maker_spec.rb:60
3) Puppet::Util::NagiosMaker should deduplicate the parameter list
Failure/Error: @type.expects(:newproperty).with(:one)
Mocha::ExpectationError:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:type>.newproperty(:one)
satisfied expectations:
- allowed any number of times, not yet invoked:
Signal.trap(any_parameters)
- allowed any number of times, invoked once: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked twice: #<Mock:nagios
type>.namevar(any_parameters)
- allowed any number of times, not yet invoked: #<Mock:nagios
type>.parameters(any_parameters)
- allowed any number of times, invoked once: .type(:test)
- allowed any number of times, invoked once:
#<Mock:provider>.nagios_type(any_parameters)
- expected exactly once, invoked once: #<Mock:type>.newproperty(:target)
- allowed any number of times, invoked once:
#<Mock:type>.ensurable(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.provide(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.newproperty(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.desc(any_parameters)
- allowed any number of times, invoked once:
#<Mock:type>.newparam(any_parameters)
- expected exactly once, invoked once: Puppet::Type.newtype(:nagios_test)
# ./nagios_maker_spec.rb:70
Finished in 0.03071 seconds
13 examples, 3 failures
</pre>
----------------------------------------
Bug #4020: metaparameter "hostgroups" in nagios_host type should accept arrays
https://projects.puppetlabs.com/issues/4020
Author: Gabriel Filion
Status: Tests Insufficient
Priority: Normal
Assignee: James Turnbull
Category: nagios
Target version: 2.7.x
Affected Puppet version:
Keywords: communitypatch
Branch:
When supplying an array of strings to the hostgroups value of nagios_host
resources, the strings should be joined by commas.
currently, doing so:
nagios_host{ "foo.bar":
address => "foo.bar",
hostgroups => ["hello", "world"],
}
results in something like the following:
define host {
address foo.bar
host_name foo.bar
hostgroups hello
}
It should instead read:
define host {
address foo.bar
host_name foo.bar
hostgroups hello,world
}
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.