Add verify_ssl option to Splunk component (#19112)
* added verify_ssl option to Splunk component * update Splunk tests * fix typo in Splunk tests * Update test
This commit is contained in:
1 parent
cd0da4ed0e
commit
bf8b201bb3
2 files changed
+10
-8
No files matched your search
@@ -31,6 +31,7 @@ class TestSplunk(unittest.TestCase):
|
||||
'port': 123,
|
||||
'token': 'secret',
|
||||
'ssl': 'False',
|
||||
'verify_ssl': 'True',
|
||||
'name': 'hostname',
|
||||
}
|
||||
}
|
||||
@@ -88,10 +89,9 @@ class TestSplunk(unittest.TestCase):
|
||||
}
|
||||
|
||||
for in_, out in valid.items():
|
||||
state = mock.MagicMock(state=in_,
|
||||
domain='fake',
|
||||
object_id='entity',
|
||||
attributes={'datetime_attr': now})
|
||||
state = mock.MagicMock(
|
||||
state=in_, domain='fake', object_id='entity',
|
||||
attributes={'datetime_attr': now})
|
||||
event = mock.MagicMock(data={'new_state': state}, time_fired=12345)
|
||||
|
||||
try:
|
||||
@@ -118,6 +118,5 @@ class TestSplunk(unittest.TestCase):
|
||||
mock.call(
|
||||
payload['host'], data=json.dumps(payload),
|
||||
headers={'Authorization': 'Splunk secret'},
|
||||
timeout=10
|
||||
)
|
||||
timeout=10, verify=True)
|
||||
self.mock_post.reset_mock()
|
||||
Reference in new issue
Block a user