mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Increase timeout for run_run in ShellCase
This commit is contained in:
parent
8e60cccdfb
commit
6fdc458a7f
2 changed files with 21 additions and 10 deletions
|
@ -152,8 +152,8 @@ class StateRunnerTest(ShellCase):
|
|||
' Result: True']
|
||||
|
||||
second = [' ID: test-state',
|
||||
' Function: salt.state',
|
||||
' Result: True']
|
||||
' Function: salt.state',
|
||||
' Result: True']
|
||||
|
||||
third = [' ID: cmd.run',
|
||||
' Function: salt.function',
|
||||
|
@ -171,7 +171,7 @@ class StateRunnerTest(ShellCase):
|
|||
'''
|
||||
self.run_run('saltutil.sync_runners')
|
||||
self.run_run('saltutil.sync_wheel')
|
||||
ret = '\n'.join(self.run_run('state.orchestrate orch.retcode', timeout=120))
|
||||
ret = '\n'.join(self.run_run('state.orchestrate orch.retcode'))
|
||||
|
||||
for result in (' ID: test_runner_success\n'
|
||||
' Function: salt.runner\n'
|
||||
|
|
|
@ -139,15 +139,26 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
|||
)
|
||||
return self.run_script('salt-ssh', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr, raw=True)
|
||||
|
||||
def run_run(self, arg_str, with_retcode=False, catch_stderr=False, async=False, timeout=60, config_dir=None):
|
||||
def run_run(self,
|
||||
arg_str,
|
||||
with_retcode=False,
|
||||
catch_stderr=False,
|
||||
async=False,
|
||||
timeout=60,
|
||||
config_dir=None):
|
||||
'''
|
||||
Execute salt-run
|
||||
'''
|
||||
arg_str = '-c {0}{async_flag} -t {timeout} {1}'.format(config_dir or self.get_config_dir(),
|
||||
arg_str,
|
||||
timeout=timeout,
|
||||
async_flag=' --async' if async else '')
|
||||
return self.run_script('salt-run', arg_str, with_retcode=with_retcode, catch_stderr=catch_stderr)
|
||||
arg_str = '-c {0}{async_flag} -t {timeout} {1}'.format(
|
||||
config_dir or self.get_config_dir(),
|
||||
arg_str,
|
||||
timeout=timeout,
|
||||
async_flag=' --async' if async else '')
|
||||
return self.run_script('salt-run',
|
||||
arg_str,
|
||||
with_retcode=with_retcode,
|
||||
catch_stderr=catch_stderr,
|
||||
timeout=timeout)
|
||||
|
||||
def run_run_plus(self, fun, *arg, **kwargs):
|
||||
'''
|
||||
|
@ -483,7 +494,7 @@ class ShellCase(ShellTestCase, AdaptedConfigurationTestCaseMixin, ScriptPathMixi
|
|||
log.debug('Result of run_ssh for command \'%s\': %s', arg_str, ret)
|
||||
return ret
|
||||
|
||||
def run_run(self, arg_str, with_retcode=False, catch_stderr=False, async=False, timeout=60, config_dir=None):
|
||||
def run_run(self, arg_str, with_retcode=False, catch_stderr=False, async=False, timeout=180, config_dir=None):
|
||||
'''
|
||||
Execute salt-run
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue