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

Added http_socket param to client config #776 #805

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

alvagante
Copy link
Collaborator

@alvagante alvagante commented Aug 30, 2017

Pull Request Checklist

Added parameter http_socket to client config.

Description

Added parameter to main class, and then reference to it in sunse::client is passwd to the sensu_client_config type used the new json write approach.

Related Issue

Fixes #776

Motivation and Context

How Has This Been Tested?

Tested os samples vms and spec.

General

  • Update README.md with any necessary configuration snippets

  • New parameters are documented

  • New parameters have tests

  • Tests pass - bundle exec rake validate lint spec

@@ -62,4 +62,22 @@
end
end
end
describe 'http_socket' do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a test that reads a fixture file and sees that the json created matches like what is done in spec/defines/sensu_check_spec.rb.

Copy link
Collaborator Author

@alvagante alvagante Aug 31, 2017

Choose a reason for hiding this comment

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

@ghoneycutt sorry, I spent 2 hours in trying to make it and I didn't succeed, so I prefer to raise hand before engaging further efforts.
First, I'm not 100% sure on where you want the test, on the sensu_client_config type (here) or on the sensu::client class.
I've tried with both , but haven't found any usable resource to compare directly to the fixturejson file, in spec/classes/sensu_client_spec.rb (where I could use an approach similar to the spec/defines/sensu_check_spec.rb) I can only tests parameters passed to the the sensu_client_config type, and this is already done.
In spec/unit/sensu_client_config_spec.rb I don't know what to compare with the content of the fixture file, I can test single params, but haven't found a way to do something based on the whole file.
IMHO current tests, and tested implementation on real VM, should be enough, considering that also for other params of sensu_client_config we don't tests against fixture json files.
But I leave to you the final word here and, eventually, the support to finalise the tests.

@ghoneycutt ghoneycutt merged commit 7f253a7 into sensu:master Aug 31, 2017
@ghoneycutt
Copy link
Collaborator

Thanks! Released in v2.34.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.

Client config should support http_socket
3 participants