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

add sensu version facter (continued) #894

Merged
merged 1 commit into from
Apr 16, 2018
Merged

Conversation

treydock
Copy link
Collaborator

This is a continuation of #818

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')
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@treydock
Copy link
Collaborator Author

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:

freerange/mocha#327

Example of rspec mock:

https://github.com/treydock/puppet-osg/blob/master/spec/unit/facter/osg_version_spec.rb

@treydock
Copy link
Collaborator Author

@ghoneycutt Fixed tests by using rspec mocks.

@ghoneycutt
Copy link
Collaborator

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>
@treydock
Copy link
Collaborator Author

@ghoneycutt Squashed and co-author change made.

@ghoneycutt
Copy link
Collaborator

Replaces #818

@ghoneycutt ghoneycutt merged commit 1e6fb5a into sensu:master Apr 16, 2018
@ghoneycutt
Copy link
Collaborator

Released in v2.52.0

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