The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #2520

Broken tests in Puppet 0.25.x HEAD

Added by James Turnbull over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:08/10/2009
Priority:NormalDue date:
Assignee:James Turnbull% Done:

0%

Category:testing
Target version:2.6.0
Affected Puppet version:0.25.0rc1 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

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: #.send_message(any_parameters)
satisfied expectations:
- allowed any number of times, not yet invoked: #.register_terminus_type(any_parameters)
- allowed any number of times, not yet invoked: #.model(any_parameters)
- allowed any number of times, already invoked 4 times: #.name(any_parameters)
- allowed any number of times, already invoked once: Puppet::Indirector::Indirection.instance(:my_queue)
- allowed any number of times, already invoked once: #.value(:queue_type)
- allowed any number of times, not yet invoked: #.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: #.key(any_parameters)
- allowed any number of times, already invoked twice: #.instance(any_parameters)
./spec/unit/indirector/queue.rb:81:
./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)
SystemExit in 'Puppet::Network::Server when using webrick after unlistening should not be reachable on the port and address assigned'
exit
/home/james/src/puppet/spec/../lib/puppet/application/puppetmasterd.rb:36:in `exit'
/home/james/src/puppet/spec/../lib/puppet/application/puppetmasterd.rb:36:in `run_preinit'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `call'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `join'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `unlisten'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:45:in `synchronize'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:45:in `unlisten'
/home/james/src/puppet/spec/../lib/puppet/network/server.rb:136:in `unlisten'
./spec/integration/network/server/webrick.rb:81:
./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 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'

12)
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'

13)
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'

14)
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'

15)
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'

16)
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'

17)
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'

18)
Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to save CSRs'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.26845.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'

19)
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.26845.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'

20)
Puppet::Error in 'Puppet::SSL::CertificateRequest should save the completely CSR when saving'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.26845.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 1497.263173 seconds

6897 examples, 20 failures, 24 pending
Loaded suite /usr/bin/rcov

This is at commit:“a88fc4d24c50d91aa764fa8f52797e86bb6d8965”.


Related issues

Related to Puppet - Bug #2113: Failing test in master Closed 03/26/2009
Related to Puppet - Bug #2447: CSR tests broken Duplicate 07/25/2009
Related to Puppet - Bug #2489: Spec tests without JSON installed fail Closed 08/04/2009

History

#1 Updated by Markus Roberts over 4 years ago

  • Status changed from Accepted to Needs More Information
  • Assignee set to James Turnbull

I believe all of these have been dealt with in other tickets—at least as of this morning rake spec on master gives me 0 errors.

Are you still thinking any of them are open issues or need to be dealt with on this ticket? If so, please specify; if not, I’d say just close it.

#2 Updated by James Turnbull over 4 years ago

  • Status changed from Needs More Information to Code Insufficient
  • Assignee changed from James Turnbull to Markus Roberts

Whereas I get:

1)
JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should s                                                   et its json_class to 'Puppet::Resource::Catalog''
source did not contain any JSON!
./spec/unit/resource/catalog.rb:894:
./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)
JSON::ParserError in 'Puppet::Resource::Catalog when converting to json should s                                                   et its data as a hash'
source did not contain any JSON!
./spec/unit/resource/catalog.rb:899:
./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 s                                                   et its name to the name of the resource'
source did not contain any JSON!
./spec/unit/resource/catalog.rb:907:
./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 s                                                   et its version to the version of the resource'
source did not contain any JSON!
./spec/unit/resource/catalog.rb:907:
./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 s                                                   et its tags to the tags of the resource'
source did not contain any JSON!
./spec/unit/resource/catalog.rb:907:
./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 c                                                   onvert its resources to a JSON-encoded array and store it as the 'resources' dat                                                   a'
source did not contain any JSON!
./spec/unit/resource/catalog.rb:920:
./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 c                                                   onvert 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:935:
./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::Indirector::Queue when saving should catch a                                                   ny exceptions raised'
not all expectations were satisfied
unsatisfied expectations:
- expected exactly once, not yet invoked: #.send_message(any_parameters)
satisfied expectations:
- allowed any number of times, not yet invoked: #.model(any_pa                                                   rameters)
- allowed any number of times, not yet invoked: #.register_ter                                                   minus_type(any_parameters)
- allowed any number of times, already invoked 4 times: #.name                                                   (any_parameters)
- allowed any number of times, already invoked once: Puppet::Indirector::Indirec                                                   tion.instance(:my_queue)
- allowed any number of times, already invoked once: #.value(:queue_type)
- allowed any number of times, not yet invoked: #.value(any_parameters)
- allowed any number of times, already invoked once: Puppet::Util::Queue.queue_t                                                   ype_to_class(:test_client)
- allowed any number of times, already invoked twice: #.key(any_pa                                                   rameters)
- allowed any number of times, already invoked twice: #.instance(a                                                   ny_parameters)
./spec/unit/indirector/queue.rb:81:
./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)
'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'

10)
SystemExit in 'Puppet::Network::Server when using webrick after unlistening shou                                                   ld not be reachable on the port and address assigned'
exit
/home/james/src/puppet/spec/../lib/puppet/application/puppetmasterd.rb:36:in `ex                                                   it'
/home/james/src/puppet/spec/../lib/puppet/application/puppetmasterd.rb:36:in `ru                                                   n_preinit'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `call'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `join'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:48:in `unliste                                                   n'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:45:in `synchro                                                   nize'
/home/james/src/puppet/spec/../lib/puppet/network/http/webrick.rb:45:in `unliste                                                   n'
/home/james/src/puppet/spec/../lib/puppet/network/server.rb:136:in `unlisten'
./spec/integration/network/server/webrick.rb:81:
./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 set the 'j                                                   son_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'

12)
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'

13)
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'

14)
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'

15)
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'

16)
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'

17)
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'

18)
Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to save CSRs'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.1536                                                   2.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:1                                                   0: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'

19)
Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to find saved c                                                   ertificate requests via the Indirector'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.1536                                                   2.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:1                                                   0: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'

20)
Puppet::Error in 'Puppet::SSL::CertificateRequest should save the completely CSR                                                    when saving'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.1536                                                   2.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:1                                                   0: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'

So I suspect not all fixed. :)

#3 Updated by Markus Roberts over 4 years ago

  • Assignee changed from Markus Roberts to James Turnbull

Sorry if I’m being dense, but what code are you running? The ticket says “0.24.8” in the Affected version field and “0.25.x HEAD” in the title, and neither makes sense to me (0.24.8 because that would be a silly thing to test against at this stage and 0.25.x HEAD because I’m not seeing a 0.25.x branch anywhere).

I’m testing against master HEAD (http://github.com/reductivelabs/puppet/tree/master) and not seeing these issues. Is this a reproducability problem or am I just barking up the wrong branch?

— Markus

P.S. I’d intended to change the status to “Need More Information” but the list of status is strangely restricted. Any idea why?

#4 Updated by James Turnbull over 4 years ago

  • Affected Puppet version changed from 0.24.8 to 0.25.0rc1

Sorry – I am running the master HEAD branch to get these failures – I AKA master = 0.25.x in my comms sometimes.

The statuses are restricted by workflow – you can only go certain directions.

#5 Updated by James Turnbull over 4 years ago

  • Assignee changed from James Turnbull to Markus Roberts

#6 Updated by Markus Roberts over 4 years ago

I’ll search my test ordering data to see if these match any of the cases there. If it is just test ordering (to some confidence level) then I suspect Luke will want to defer this till 0.26 (and I"d tend to agree). But it might not be, so I’ll check it out.

— Markus

#7 Updated by Luke Kanies over 4 years ago

I concur, if they’re failures because of ordering, it should get bumped. Fixing that problem will be one of our goals in 0.26.

#8 Updated by Markus Roberts over 4 years ago

Look very much like 18, 19, and 20 test interactions. They are reproducible by:

touch spec/unit/application/puppetmasterd.rb
/usr/bin/ruby1.8 -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/application/puppetmasterd.rb \
    spec/integration/ssl/certificate_request.rb \
    -t 60 --format s --loadby mtime

#9 Updated by Markus Roberts over 4 years ago

James —

Errors 11-17 have me stumped. The error seems to indicate that two arguments are being passed into to_json when one is expected:

ArgumentError in 'Puppet::Relationship when...
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'

…yet the code in question as I see it:

./spec/unit/relationship.rb, 174

        JSON.parse @edge.to_json

./lib/puppet/relationship.rb, 76-91

    def to_json(*args)
        data = {
            'source' => source.to_s,
            'target' => target.to_s
        }

        ["event", "callback"].each do |attr|
            next unless value = send(attr)
            data[attr] = value
        end

        {
            'json_class' => self.class.to_s,
            'data' => data
        }.to_json(*args)
    end

…is passing in zero arguments (args == []) and there’s nowhere in this short chain that it could be getting fiddled with. Could you confirm that the files on your system match these snippets?

Thanks,

— Markus

#10 Updated by Markus Roberts over 4 years ago

  • Assignee changed from Markus Roberts to James Turnbull

Reassigning to flag question; assign back when answered.

#11 Updated by Luke Kanies over 4 years ago

99% of the time when a json issue stumps me it’s because json encoding or decoding does so recursively. So it could be that if you have a contained and containing class, the containing class is called correctly but the contained class is not. Check the various related classes and how the call each other.

#12 Updated by Markus Roberts over 4 years ago

Yeah, that’s what I thought at first too, though the stack traces don’t leave much wiggle room and none of the plausible places lead to anything. I put the json ones aside when I wrote the note above and have been working on other stuff. Will come back to them tomorrow.

#13 Updated by Markus Roberts over 4 years ago

Not conclusive, but indicative: under some test orderings, code from @/usr/local/lib/site_ruby/1.8/puppet/@ (or the moral equivalent in your environment) gets loaded in preference to code from the test directory. This is similar but unrelated to the analogous rake problem, in that it happens even if the tests are run directly with spec and not via rake.

I have no evidence that this is related to the problem at hand, but I discovered it in the process of trying to reproduce James’s error report and can not yet show that it is unrelated either.

#14 Updated by Luke Kanies over 4 years ago

Markus Roberts wrote:

Not conclusive, but indicative: under some test orderings, code from @/usr/local/lib/site_ruby/1.8/puppet/@ (or the moral equivalent in your environment) gets loaded in preference to code from the test directory. This is similar but unrelated to the analogous rake problem, in that it happens even if the tests are run directly with spec and not via rake.

I have no evidence that this is related to the problem at hand, but I discovered it in the process of trying to reproduce James’s error report and can not yet show that it is unrelated either.

The only time I could see it being reasonable that files from /usr or wherever are loaded is if a file is missing in the git repo (e.g., a file was expected but removed) or if there’s promiscuous autoloading that loads all files in a given ruby subdirectory. Neither case is really possible to eliminate.

#15 Updated by Markus Roberts over 4 years ago

  • Status changed from Code Insufficient to In Topic Branch Pending Review

James —

All of the errors fall into one of two categories and could be plausibly explained by either 1) older code being tested or 2) a mix of older and newer code being tested. Further, we now know that under some circumstances the spec process will load code from the installed version of puppet, which could plausibly create such an old code/new code hybrid. While this is not conclusive, there are a few things we could do to test the hypothesis.

Run “sudo ruby install.rb” prior to performing the tests (to make sure the same code is being executed, regardless of the location) and retry. Obviously, don’t do this on a box that needs to have a specific version of puppet installed.

Unistall puppet by removing the …/site_ruby/1.8/puppet directory (same caveats) and retest

Set me up with an environment that exhibits the problems so I can poke at to try to narrow it down from the other end (see my e-mail)

— Markus

#16 Updated by James Turnbull over 4 years ago

I’ve tried this with:

  1. No local Puppet installed.
  2. An install.rb run before the spec tests

Still fails.

All the json bugs seems to only be present when the json gem isn’t installed – they go away if I install the gem leaving:

1)
'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'

2)
Puppet::Error in 'Puppet::SSL::CertificateRequest should be able to save CSRs'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.32684.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'

3)
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.32684.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'

4)
Puppet::Error in 'Puppet::SSL::CertificateRequest should save the completely CSR when saving'
Cannot save luke.madstop.com; parent directory /tmp/csr_integration_testing.32684.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'

5)
'puppetmasterd should create a PID file' FAILED
expected true, got false
./spec/integration/bin/puppetmasterd.rb:67:
./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)
Puppet::SSLCertificates::Support::MissingCertificate in 'puppetmasterd should be serving status information over xmlrpc'
No host certificate
/home/james/src/puppet/lib/puppet/sslcertificates/support.rb:82:in `mk_cert'
/home/james/src/puppet/lib/puppet/sslcertificates/support.rb:45:in `send'
/home/james/src/puppet/lib/puppet/sslcertificates/support.rb:45:in `cert'
./spec/integration/bin/puppetmasterd.rb:84:
./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 Updated by James Turnbull over 4 years ago

  • Target version changed from 0.25.0 to 2.6.0

Bumped this … we can restructure the tests in 0.26.0

#18 Updated by James Turnbull over 4 years ago

  • Status changed from In Topic Branch Pending Review to Accepted

#19 Updated by James Turnbull over 4 years ago

  • Status changed from Accepted to Closed

Bulk test failure tickets retired in favour of individual tickets.

Also available in: Atom PDF