Issue #2489 has been updated by James Turnbull. Subject changed from Unable to run spec tests to Spec tests without JSON installed fail Assigned to set to Luke Kanies Target version set to 0.25.0
This is a paste of all tests and the single test file: http://pastie.org/pastes/570729 Also note removing the json gem breaks a lot of tests: <pre> 1) Mocha::ExpectationError in 'Puppet::Indirector::Queue when saving should catch any exceptions raised' not all expectations were satisfied unsatisfied expectations: - expected exactly once, not yet invoked: #<Puppet::Indirector::Queue::TestClient:0x7f8dd9fcadc8>.send_message(any_parameters) satisfied expectations: - allowed any number of times, not yet invoked: #<Mock:indirection>.model(any_parameters) - allowed any number of times, already invoked 4 times: #<Mock:indirection>.name(any_parameters) - allowed any number of times, not yet invoked: #<Mock:indirection>.register_terminus_type(any_parameters) - allowed any number of times, already invoked once: Puppet::Indirector::Indirection.instance(:my_queue) - allowed any number of times, already invoked once: #<Puppet::Util::Settings:0x7f8dddb48e68>.value(:queue_type) - allowed any number of times, not yet invoked: #<Puppet::Util::Settings:0x7f8dddb48e68>.value(any_parameters) - allowed any number of times, already invoked once: Puppet::Util::Queue.queue_type_to_class(:test_client) - allowed any number of times, already invoked twice: #<Mock:request>.instance(any_parameters) - allowed any number of times, already invoked twice: #<Mock:request>.key(any_parameters) ./spec/unit/indirector/queue.rb:79: ./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) 'Puppet::Type::File when writing files should fail if no backup can be performed' FAILED expected: "bar\n", got: "foo" (using ==) ./spec/integration/type/file.rb:54: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should set its json_class to 'Puppet::Resource::Catalog'' source did not contain any JSON! ./spec/unit/resource/catalog.rb:887: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should set its data as a hash' source did not contain any JSON! ./spec/unit/resource/catalog.rb:892: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should set its name to the name of the resource' source did not contain any JSON! ./spec/unit/resource/catalog.rb:900: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should set its version to the version of the resource' source did not contain any JSON! ./spec/unit/resource/catalog.rb:900: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should set its tags to the tags of the resource' source did not contain any JSON! ./spec/unit/resource/catalog.rb:900: ./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) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should convert its resources to a JSON-encoded array and store it as the 'resources' data' source did not contain any JSON! ./spec/unit/resource/catalog.rb:913: ./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' 9) JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should convert its edges to a JSON-encoded array and store it as the 'edges' data' source did not contain any JSON! ./spec/unit/resource/catalog.rb:928: ./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' 10) ArgumentError in 'Puppet::Relationship when converting to json should set the 'json_class' to Puppet::Relationship' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:174: ./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' 11) ArgumentError in 'Puppet::Relationship when converting to json should store the stringified source as the source in the data' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:180: ./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' 12) ArgumentError in 'Puppet::Relationship when converting to json should store the stringified target as the target in the data' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:186: ./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' 13) ArgumentError in 'Puppet::Relationship when converting to json should store the jsonified event as the event in the data' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:193: ./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' 14) ArgumentError in 'Puppet::Relationship when converting to json should not store an event when none is set' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:200: ./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' 15) ArgumentError in 'Puppet::Relationship when converting to json should store the jsonified callback as the callback in the data' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:207: ./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' 16) ArgumentError in 'Puppet::Relationship when converting to json should not store a callback when none is set in the edge' wrong number of arguments (2 for 1) /home/james/src/puppet/lib/puppet/relationship.rb:90:in `to_json' ./spec/unit/relationship.rb:214: ./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' 17) Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to save CSRs' Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.11960.0/ssl/ca/requests does not exist /home/james/src/puppet/lib/puppet/indirector/ssl_file.rb:95:in `save' /home/james/src/puppet/spec/../lib/puppet/indirector/certificate_request/ca.rb:10:in `save' /home/james/src/puppet/lib/puppet/indirector/indirection.rb:258:in `save' /home/james/src/puppet/lib/puppet/indirector.rb:65:in `save' /home/james/src/puppet/lib/puppet/ssl/certificate_request.rb:44:in `save' ./spec/integration/ssl/certificate_request.rb:43: ./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' 18) Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to find saved certificate requests via the Indirector' Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.11960.0/ssl/ca/requests does not exist /home/james/src/puppet/lib/puppet/indirector/ssl_file.rb:95:in `save' /home/james/src/puppet/spec/../lib/puppet/indirector/certificate_request/ca.rb:10:in `save' /home/james/src/puppet/lib/puppet/indirector/indirection.rb:258:in `save' /home/james/src/puppet/lib/puppet/indirector.rb:65:in `save' /home/james/src/puppet/lib/puppet/ssl/certificate_request.rb:44:in `save' ./spec/integration/ssl/certificate_request.rb:48: ./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' 19) Puppet::Error in 'Puppet::SSL::CertificateRequest should save the completely CSR when saving' Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.11960.0/ssl/ca/requests does not exist /home/james/src/puppet/lib/puppet/indirector/ssl_file.rb:95:in `save' /home/james/src/puppet/spec/../lib/puppet/indirector/certificate_request/ca.rb:10:in `save' /home/james/src/puppet/lib/puppet/indirector/indirection.rb:258:in `save' /home/james/src/puppet/lib/puppet/indirector.rb:65:in `save' /home/james/src/puppet/lib/puppet/ssl/certificate_request.rb:44:in `save' ./spec/integration/ssl/certificate_request.rb:55: ./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' Finished in 362.381821 seconds 6877 examples, 19 failures, 24 pending </pre> ---------------------------------------- Bug #2489: Spec tests without JSON installed fail http://projects.reductivelabs.com/issues/2489 Author: James Turnbull Status: Accepted Priority: Normal Assigned to: Luke Kanies Category: testing Target version: 0.25.0 Complexity: Unknown Affected version: 0.25.0rc1 Keywords: Platform: RHEL5 <pre> # rake spec (in /root/puppet.git) ./lib/puppet.rb:27: warning: already initialized constant PUPPETVERSION /root/puppet.git/spec/../lib/puppet/indirector/indirection.rb:308:in `make_terminus': Could not find terminus queue for indirection catalog (ArgumentError) from /root/puppet.git/spec/../lib/puppet/indirector/indirection.rb:130:in `terminus' from ./spec/integration/indirector/catalog/queue.rb:7 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec/runner/example_group_runner.rb:15:in `load_files' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec/runner/example_group_runner.rb:14:in `each' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec/runner/example_group_runner.rb:14:in `load_files' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec/runner/options.rb:97:in `run_examples' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/lib/spec/runner/command_line.rb:9:in `run' from /usr/lib/ruby/gems/1.8/gems/rspec-1.2.2/bin/spec:4 rake aborted! </pre> running the individual spec file returned: <pre> running just the failing test file gives: custom_require.rb:31:in `gem_original_require': no such file to load -- json (MissingSourceFile) </pre> Adding the json gem removed the issue but I can't replicate it on F11. -- 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 -~----------~----~----~----~------~----~------~--~---
