You've already forked community.general
mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 20:21:52 +03:00
callback_splunk - Add user-configurable event correlation id (#2790)
* Initial commit * Adding changelog fragment * Updating batch description * Update plugins/callback/splunk.py Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@ -43,7 +43,10 @@ class TestSplunkClient(unittest.TestCase):
|
||||
mock_datetime.utcnow.return_value = datetime(2020, 12, 1)
|
||||
result = TaskResult(host=self.mock_host, task=self.mock_task, return_data={}, task_fields=self.task_fields)
|
||||
|
||||
self.splunk.send_event(url='endpoint', authtoken='token', validate_certs=False, include_milliseconds=True, state='OK', result=result, runtime=100)
|
||||
self.splunk.send_event(
|
||||
url='endpoint', authtoken='token', validate_certs=False, include_milliseconds=True,
|
||||
batch="abcefghi-1234-5678-9012-abcdefghijkl", state='OK', result=result, runtime=100
|
||||
)
|
||||
|
||||
args, kwargs = open_url_mock.call_args
|
||||
sent_data = json.loads(args[1])
|
||||
@ -58,7 +61,10 @@ class TestSplunkClient(unittest.TestCase):
|
||||
mock_datetime.utcnow.return_value = datetime(2020, 12, 1)
|
||||
result = TaskResult(host=self.mock_host, task=self.mock_task, return_data={}, task_fields=self.task_fields)
|
||||
|
||||
self.splunk.send_event(url='endpoint', authtoken='token', validate_certs=False, include_milliseconds=False, state='OK', result=result, runtime=100)
|
||||
self.splunk.send_event(
|
||||
url='endpoint', authtoken='token', validate_certs=False, include_milliseconds=False,
|
||||
batch="abcefghi-1234-5678-9012-abcdefghijkl", state='OK', result=result, runtime=100
|
||||
)
|
||||
|
||||
args, kwargs = open_url_mock.call_args
|
||||
sent_data = json.loads(args[1])
|
||||
|
Reference in New Issue
Block a user