Issue #2884 has been updated by Jesse Wolfe.
This is basically the failure that happens if the call to Puppet::Property::KeyValue.initvalues in the spec isn't called. Some testing later I find: puppet/type/property.rb is really the same file as puppet/property.rb , but circa puppet 0.22.4 The hybrid definition that happens when you load the old file followed by the new file overrides Property.initvalues so that it doesn't bubble up to its parent class (Parameter) Which is to say, this is really an autoload bug exacerbated by renamed legacy files and klunky object initializations, but I have not yet discovered how this file got loaded. ---------------------------------------- Bug #2884: Test isolation: spec/unit/property/keyvalue.rb generates 6 spurious errors http://projects.reductivelabs.com/issues/2884 Author: Markus Roberts Status: Accepted Priority: Low Assigned to: Jesse Wolfe Category: testing Target version: 0.25.4 Affected version: 0.25.1 Keywords: Branch: I was optimistic that catching/cataloging the pair-wise interactions would solve most of our test isolation problems, but that hope is seeming unwarranted. Yesterday I wound up tracing two sets of errors that are apparently three-way interactions. This is the first: spec/unit/property/keyvalue.rb generates six spurious errors: 1) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling should should call process_current_hash' Validate method failed for class : undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:85: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 2) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling should should return the hashed values of @should and the nilled values of retrieve if inclusive' Validate method failed for class : undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:92: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 3) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling should should return the hashed @should + the unique values of retrieve if !inclusive' Validate method failed for class : undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:99: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 4) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling insync? should return true if the passed in values is nil' Validate method failed for class prop_name: undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:149: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 5) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling insync? should return true if hashified should value == (retrieved) value passed in' Validate method failed for class prop_name: undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:155: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 6) Puppet::DevError in 'Puppet::Property::KeyValue as an instance when calling insync? should return false if prepared value != should value' Validate method failed for class prop_name: undefined method `validate' for nil:NilClass /Users/markus/projects/puppet/lib/puppet/parameter.rb:483:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/property.rb:381:in `unsafe_validate' /Users/markus/projects/puppet/lib/puppet/parameter.rb:489:in `validate' /Library/Ruby/Site/1.8/puppet/type/property.rb:370:in `should=' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `each' /Library/Ruby/Site/1.8/puppet/type/property.rb:369:in `should=' ./spec/unit/property/keyvalue.rb:162: /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' /Users/markus/projects/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' when run with spec/integration/reference/providers.rb and spec/integration/indirector/catalog/queue.rb touch spec/integration/indirector/catalog/queue.rb sleep 2 touch spec/integration/reference/providers.rb sleep 2 touch spec/unit/property/keyvalue.rb spec --format s --loadby mtime spec/unit/property/keyvalue.rb spec/integration/reference/providers.rb spec/integration/indirector/catalog/queue.rb -- 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://reductivelabs.com/redmine/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.
