Closed zugf closed 3 months ago
CLA Assistant Lite bot All contributors have signed the COC ✍️ ✅
Posted by the CLA Assistant Lite bot.
Where can I find the CLA document and how do I sign it?
@zugf thanks for the proposed fix!
you can find CLA here - CLA.md and Code of Conduct here - CODE_OF_CONDUCT.md.
in order to sign CLA and CoC - please post a comment "I have read the CLA Document and I hereby accept the CLA" and then another comment "I have read the Code of Conduct and I hereby accept the Terms"
I have read the Code of Conduct and I hereby accept the Terms
I have read the CLA Document and I hereby accept the CLA
hmm, the update makes sense. Can you please add unit test case for it as well so we can capture this behaviour?
@zugf we can help you with tests if you don't feel comfortable with approaching them yourself :)
To avoid code duplication, I’ve refactored test_hec_event_writer into a parametrized test.
The last 5 lines of the code have been extracted into a separate unit test.
The behaviour will be tested by the last parameter set (create_hec_event_writercreate_from_tokenexternal_host, False).
This simulates a machine without a Splunk installation that uses the HEC to push events to a different machine. Existing monkey patch functionality is used to unset SPLUNK_HOME.
@zugf , can you please sign the commits, and we can proceed to merge the changes (signing commits guide).
Commits are signed. Have a good weekend Florian
:tada: This issue has been resolved in version 5.1.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
When create_from_token() is invoked, it triggers the HECEventWriter constructor with scheme, host, and port set to None. This leads to a get_splunkd_access_info() call, which throws an exception if the HEC URI doesn’t reference the local machine. As this call is unnecessary in such cases, its invocation has been relocated within the if-statement