-
Notifications
You must be signed in to change notification settings - Fork 289
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
add sensu version facter (continued) #894
Conversation
it do | ||
File.stubs(:exists?).with('/opt/sensu/embedded/bin/sensu-client').returns(true) | ||
Facter::Util::Resolution.expects(:exec).with('/opt/sensu/embedded/bin/sensu-client --version 2>&1').returns('0.23.3') | ||
expect(Facter.value(:sensu_version)).to eql('0.23.3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems these tests are failing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use this as a reference for stubbing facts
This is issue with mocha. Explanation of why be good to use rspec mocks instead of mocha. puppetlabs/puppetlabs_spec_helper@695876f Change in mocha 1.5.0 that breaks tests: Example of rspec mock: https://github.com/treydock/puppet-osg/blob/master/spec/unit/facter/osg_version_spec.rb |
@ghoneycutt Fixed tests by using rspec mocks. |
Looks good! Could you please squash the commits and keep @bovy89 as a co-author. https://help.github.com/articles/creating-a-commit-with-multiple-authors/ |
Check sensu_version fact for all vagrant boxes Using `facter -p` would require plugin sync which requires setting up puppetserver, defining --custom-dir avoids need for plugin sync Co-authored-by: bovy89 <bovy89@gmail.com> Co-authored-by: Trey Dockendorf <treydock@gmail.com>
@ghoneycutt Squashed and co-author change made. |
Replaces #818 |
Released in v2.52.0 |
This is a continuation of #818