-
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_event type #920
Add sensu_event type #920
Conversation
|
||
def state | ||
return @property_hash[:ensure] | ||
=begin |
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.
what's this begin/end bit about?
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.
These are block comments I forgot to remove after testing.
end | ||
|
||
describe 'destroy' do | ||
# before(:each) do |
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.
why the commented out code in the commit?
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.
Commented out from file this was copied from, forgot to cleanup, will remove.
end | ||
end | ||
|
||
=begin |
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.
What's this?
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.
Block comment, I'll remove.
spec/unit/sensu_event_spec.rb
Outdated
].each do |property| | ||
it "should not accept invalid #{property}" do | ||
config[property] = 'foo bar' | ||
expect { event }.to raise_error(Puppet::Error) |
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.
This should probably have an error message that is expected
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.
Will update.
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.
Actually this block is empty, so the test never actually gets executed. I left these empty test blocks around in case properties got added that fit the block's test criteria. There are several places in code these blocks are actually tested, I'll update those in separate pull request.
c55241a
to
f9d0abb
Compare
Having issues with acceptance tests, so canceling the build since it is long lived. |
I thought that would be fixed by latest commit but it wasn't, will investigate. Thus far I haven't been able to reproduce locally using beaker and centos-7 set. The testing of events is rather tricky since events can't be created for the purpose of testing, at least not without first creating some checks and having them run and then forcing one to fail, but I fear all that effort would add a lot of time to the acceptance tests which some are already timing out. |
Agreed that we should not do that extra effort which will lead to the tests timing out. |
f287bfe
to
97531bf
Compare
…ve event. Hopefully this fixes sporadic acceptance test failures
97531bf
to
ed3099b
Compare
Issue resolved by forcing agent node to have specific entity ID and not relying on local hostname lookup as seems some containers kept getting |
Pull Request Checklist
Description
Related Issue
Part of #901 .
Motivation and Context
Allow sensu-go events to be resolved and deleted.
How Has This Been Tested?
Beaker acceptance tests and vagrant instance. Travis-ci tests will fail until #916 is merged.
General
bundle exec rake validate lint spec