![]() Failures: 1) Puppet::Provider::Plugin_zabbix when making an API request should fail if Zabbix returns error Failure/Error: expect { expected Puppet::Error with message matching /Zabbix API returned/, got #<Mocha::ExpectationError: unexpected invocation: Puppet::Provider::Plugin_zabbix.make_request({'endpoint' => 'http://localhost', 'username' => 'Admin', 'password' => 'zabbix'}, {}) unsatisfied expectations: - expected exactly once, invoked twice: Puppet::Provider::Plugin_zabbix.make_request(any_parameters) satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Feature:0x27c6238>.root?(any_parameters) > with backtrace: # ./lib/puppet/provider/plugin_zabbix.rb:65:in `block in api_request' # ./lib/puppet/provider/plugin_zabbix.rb:62:in `times' # ./lib/puppet/provider/plugin_zabbix.rb:62:in `api_request' # ./spec/unit/provider/plugin_zabbix_spec.rb:35:in `block (4 levels) in <top (required)>' # ./spec/unit/provider/plugin_zabbix_spec.rb:34:in `block (3 levels) in <top (required)>' # ./spec/unit/provider/plugin_zabbix_spec.rb:34:in `block (3 levels) in <top (required)>' 2) Puppet::Type.type(:plugin_zabbix_host) should accept string for group list Failure/Error: @zabbix_host[:groups] = 'ManagedByPuppet' Puppet::ResourceError: Parameter groups failed on Plugin_zabbix_host[testhost]: Validate method failed for class groups: undefined method `each' for "ManagedByPuppet":String # ./lib/puppet/type/plugin_zabbix_host.rb:69:in `block (3 levels) in <top (required)>' # ./spec/unit/type/plugin_zabbix_host_spec.rb:59:in `block (2 levels) in <top (required)>' 3) Puppet::Type.type(:plugin_zabbix_host) should not accept non-string hostname Failure/Error: expect { expected Puppet::Error with message matching /Invalid value/ but nothing was raised # ./spec/unit/type/plugin_zabbix_host_spec.rb:92:in `block (2 levels) in <top (required)>' Finished in 0.12965 seconds (files took 0.65121 seconds to load) 64 examples, 3 failures Failed examples: rspec ./spec/unit/provider/plugin_zabbix_spec.rb:26 # Puppet::Provider::Plugin_zabbix when making an API request should fail if Zabbix returns error rspec ./spec/unit/type/plugin_zabbix_host_spec.rb:58 # Puppet::Type.type(:plugin_zabbix_host) should accept string for group list rspec ./spec/unit/type/plugin_zabbix_host_spec.rb:91 # Puppet::Type.type(:plugin_zabbix_host) should not accept non-string hostname Change-Id: If4be35785f1cabe063d1c6bad27c36d0d3d75137 |
||
---|---|---|
.. | ||
unit | ||
spec_helper.rb |