Skip to content

Commit 790ab74

Browse files
author
David Noble
committed
DVPL-4073: Develop test for problem with python splunk sdk autologin
Confirmed locally: + Binding.py, line 248 hit by test. + Autologin after service restart works with change. Signed-off-by: David Noble <dnoble@splunk.com>
1 parent c229cda commit 790ab74

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/test_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@
2626
from splunklib.client import Service
2727
from splunklib.binding import HTTPError
2828

29+
2930
class ServiceTestCase(testlib.SDKTestCase):
31+
32+
def test_autologin(self):
33+
service = client.connect(autologin=True, **self.opts.kwargs)
34+
self.service.restart(timeout=120)
35+
reader = service.jobs.oneshot("search index=internal | head 1")
36+
self.assertIsNotNone(reader)
37+
3038
def test_capabilities(self):
3139
capabilities = self.service.capabilities
3240
self.assertTrue(isinstance(capabilities, list))

0 commit comments

Comments
 (0)