Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #57 #60

Merged
merged 1 commit into from
Mar 18, 2016
Merged

Fixes #57 #60

merged 1 commit into from
Mar 18, 2016

Conversation

jyaworski
Copy link
Member

No description provided.

@jyaworski
Copy link
Member Author

@raphink any ideas here? I have no idea what this test failure is. This works for me locally.

@zloykaban
Copy link

your test fails locally

bundle exec rspec ./spec/unit/openssl_version_spec.rb
augeasproviders: setting Puppet[:libdir] to work around broken type autoloading
F

Failures:

  1. Facter::Util::Fact openssl_version with value
    Failure/Error: expect(Facter.fact(:openssl_version).value).to eq('0.9.8zg')
 Mocha::ExpectationError:
   unexpected invocation: Facter::Core::Execution.execute('uname -m', {:on_fail => nil})
   satisfied expectations:
   - allowed any number of times, not yet invoked: #<Puppet::Util::Feature:0x2c0d558>.root?(any_parameters)
   - allowed any number of times, not yet invoked: #<Puppet::Util::Feature:0x2c0d558>.root?(any_parameters)
   - allowed any number of times, not yet invoked: Facter::Core::Execution.execute('openssl version 2>&1')
   - allowed any number of times, not yet invoked: Facter::Core::Execution.which('openssl')
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/resolution.rb:135:in `block in setcode'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/resolution.rb:157:in `call'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/resolution.rb:157:in `resolve_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:63:in `block (2 levels) in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:62:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:84:in `with_timing'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:61:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:161:in `block in find_first_real_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:160:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:160:in `find_first_real_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:113:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:145:in `searching'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:110:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/collection.rb:130:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter.rb:117:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/architecture.rb:19:in `block (2 levels) in <top (required)>'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/resolution.rb:157:in `call'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/resolution.rb:157:in `resolve_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:63:in `block (2 levels) in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:62:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:84:in `with_timing'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/resolvable.rb:61:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:161:in `block in find_first_real_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:160:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:160:in `find_first_real_value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:113:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:145:in `searching'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:110:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/confine.rb:51:in `true?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `block in suitable?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `all?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `suitable?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `block in find_suitable_resolutions'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `find_all'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `find_suitable_resolutions'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:112:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:145:in `searching'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:110:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/collection.rb:130:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter.rb:117:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/ec2.rb:23:in `block (3 levels) in <top (required)>'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/confine.rb:40:in `call'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/confine.rb:40:in `true?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `block in suitable?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `all?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/core/suitable.rb:111:in `suitable?'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `block in find_suitable_resolutions'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `find_all'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:152:in `find_suitable_resolutions'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:112:in `block in value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:145:in `searching'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/fact.rb:110:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/collection.rb:130:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter.rb:117:in `value'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/ec2.rb:56:in `<top (required)>'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:130:in `load'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:130:in `kernel_load'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:115:in `load_file'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:49:in `block (2 levels) in load_all'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:47:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:47:in `block in load_all'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:45:in `each'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/loader.rb:45:in `load_all'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter/util/collection.rb:76:in `fact'
 # ./vendor/bundle/ruby/1.9.1/gems/facter-2.4.6/lib/facter.rb:87:in `fact'
 # ./spec/unit/openssl_version_spec.rb:15:in `block (4 levels) in <top (required)>'

Finished in 0.22622 seconds (files took 1.29 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/openssl_version_spec.rb:14 # Facter::Util::Fact openssl_version with value

@jyaworski
Copy link
Member Author

Interesting. They don't fail locally for me on ruby 2.0.0 or 1.9.3.

15 joseph.yaworski@jyaworski-mbpr ~/github/puppet-openssl (git)-[openssl_version_fact] % rvm 1.9.3 do bundle exec rspec spec/unit/openssl_version_spec.rb                    :(
augeasproviders: setting Puppet[:libdir] to work around broken type autoloading
.

Finished in 0.0072 seconds (files took 1.15 seconds to load)
1 example, 0 failure

I'll look into what's going on.

@raphink
Copy link
Member

raphink commented Mar 15, 2016

Ah, the joys of Ruby mocking 😄

@raphink
Copy link
Member

raphink commented Mar 15, 2016

lib/puppet/facter is a wrong path for facts.

@raphink
Copy link
Member

raphink commented Mar 15, 2016

Tests pass for me locally when moving the fact file to lib/facter/ instead (and we'll see what Travis CI says once you make that change).

@jyaworski
Copy link
Member Author

@raphink it works, but fails due to rake not being pinned on 1.8.7 after the 11 release. Not related to my changes.

@raphink
Copy link
Member

raphink commented Mar 17, 2016

@jyaworski Could you rebase now please?

@jyaworski
Copy link
Member Author

@raphink done. It passes.

raphink added a commit that referenced this pull request Mar 18, 2016
@raphink raphink merged commit 8b9fd4b into voxpupuli:master Mar 18, 2016
@raphink raphink added the bugfix label Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants