mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 16:45:27 +00:00
Add unit test for TimedProc regression
This commit is contained in:
parent
e234abd9e0
commit
6143408507
22
tests/unit/utils/test_timed_subprocess.py
Normal file
22
tests/unit/utils/test_timed_subprocess.py
Normal file
@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Import python libs
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.unit import TestCase
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils.timed_subprocess as timed_subprocess
|
||||
|
||||
|
||||
class TestTimedSubprocess(TestCase):
|
||||
|
||||
def test_timedproc_with_shell_true_and_list_args(self):
|
||||
'''
|
||||
This test confirms the fix for the regression introduced in 1f7d50d.
|
||||
The TimedProc dunder init would result in a traceback if the args were
|
||||
passed as a list and shell=True was set.
|
||||
'''
|
||||
p = timed_subprocess.TimedProc(['echo', 'foo'], shell=True)
|
||||
del p # Don't need this anymore
|
Loading…
Reference in New Issue
Block a user