Issue #2504 has been updated by James Turnbull. Target version changed from 0.25.5 to 0.25.6
---------------------------------------- Bug #2504: Sporadic test failures from spec/unit/type/tidy.rb http://projects.puppetlabs.com/issues/2504 Author: Markus Roberts Status: Accepted Priority: Normal Assigned to: Markus Roberts Category: testing Target version: 0.25.6 Affected version: 0.25.0rc1 Keywords: Branch: The tidy tests depend on some initialization being done by other tests. Consequently certain test orderings will produce the following test failures: <pre> 1) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying should configure directories to require their contained files if rmdirs is enabled, so the files will be deleted first' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, already invoked once: File.lstat('/what/ever') - expected exactly once, already invoked once: #<Mock:fileset>.files(any_parameters) - expected exactly once, already invoked once: Puppet::FileServing::Fileset.new('/what/ever', {:recurse => true}) - allowed any number of times, already invoked 6 times: #<Puppet::Type::Tidy:0xb6e83ff8>.tidy?(any_parameters) ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./lib/puppet/type/tidy.rb:226:in `mkfile' ./lib/puppet/type/tidy.rb:257:in `generate' ./lib/puppet/type/tidy.rb:257:in `collect' ./lib/puppet/type/tidy.rb:257:in `generate' ./spec/unit/type/tidy.rb:366: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 2) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and generating files should set the backup on the file if backup is set on the tidy instance' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:109: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 3) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and generating files should set the file's path to the tidy's path' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:115: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 4) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and generating files should configure the file for deletion' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:121: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 5) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and generating files should force deletion on the file' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:127: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 6) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and recursion is not used should generate a file resource if the file should be tidied' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') unsatisfied expectations: - expected exactly once, not yet invoked: #<Puppet::Type::Tidy:0xb71a4a70>.tidy?('/what/ever') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:142: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 7) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and recursion is used should generate a file resource for every file that should be tidied but not for files that should not be tidied' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') unsatisfied expectations: - expected exactly once, not yet invoked: #<Puppet::FileServing::Fileset:0xb716bb94>.files(any_parameters) - expected exactly once, not yet invoked: #<Puppet::Type::Tidy:0xb716e858>.tidy?('/what/ever/two') - expected exactly once, not yet invoked: #<Puppet::Type::Tidy:0xb716e858>.tidy?('/what/ever/one') - expected exactly once, not yet invoked: #<Puppet::Type::Tidy:0xb716e858>.tidy?('/what/ever') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, not yet invoked: File.lstat('/what/ever') - allowed any number of times, already invoked once: #<AnyInstance:Puppet::FileServing::Fileset>.stat(any_parameters) - allowed any number of times, not yet invoked: Puppet::FileServing::Fileset.new(any_parameters) ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./spec/unit/type/tidy.rb:179: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' 8) Mocha::ExpectationError in 'Puppet::Type::Tidy when tidying and determining whether a file should be tidied should sort the results inversely by path length, so files are added to the catalog before their directories' unexpected invocation: File.lstat('./lib/puppet/type/file.rb') satisfied expectations: - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0xb792e7b4>.use(any_parameters) - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - allowed any number of times, already invoked twice: File.lstat('/what/ever') - allowed any number of times, not yet invoked: File.lstat('/what/ever') - allowed any number of times, not yet invoked: #<Mock:stat>.ftype(any_parameters) - expected exactly once, already invoked once: Puppet::FileServing::Fileset.new(any_parameters) - expected exactly once, already invoked once: #<Puppet::FileServing::Fileset:0xb708a388>.files(any_parameters) - allowed any number of times, already invoked 3 times: #<Puppet::Type::Tidy:0xb708cffc>.tidy?(any_parameters) ./lib/puppet/util/autoload/file_cache.rb:46:in `file_exist?' ./lib/puppet/util/autoload.rb:83:in `load' ./lib/puppet/util/autoload.rb:81:in `each' ./lib/puppet/util/autoload.rb:81:in `load' ./lib/puppet/metatype/manager.rb:119:in `type' ./lib/puppet/type/tidy.rb:226:in `mkfile' ./lib/puppet/type/tidy.rb:257:in `generate' ./lib/puppet/type/tidy.rb:257:in `collect' ./lib/puppet/type/tidy.rb:257:in `generate' ./spec/unit/type/tidy.rb:354: ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:22:in `run' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `each' ./spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:17:in `run' </pre> The easiest known way to reproduce this problem is <pre> ruby -I/usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/bin/spec spec/unit/type/tidy.rb -t 60 --format s </pre> -- 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.
