File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1818import logging
1919
2020import splunklib .client as client
21- import splunklib . data as data
21+
2222
2323class TestApp (testlib .SDKTestCase ):
2424 app = None
@@ -39,6 +39,9 @@ def setUp(self):
3939 logging .debug ("Creating app %s" , self .app_name )
4040 else :
4141 logging .debug ("App %s already exists. Skipping creation." , self .app_name )
42+ if self .service .restart_required :
43+ self .service .restart (120 )
44+ return
4245
4346 def tearDown (self ):
4447 super (TestApp , self ).tearDown ()
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ def check_commands(self, *args):
6060 for arg in args :
6161 result = run (arg )
6262 self .assertEquals (result , 0 )
63+ self .service .login () # Because a Splunk restart invalidates our session
6364
6465 def setUp (self ):
6566 super (ExamplesTestCase , self ).setUp ()
@@ -160,7 +161,7 @@ def test_index(self):
160161 "index.py disable sdk-tests" ,
161162 "index.py enable sdk-tests" ,
162163 "index.py clean sdk-tests" )
163- self . service . restart ( 120 )
164+ return
164165
165166 def test_info (self ):
166167 self .check_commands (
You can’t perform that action at this time.
0 commit comments