mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge branch '2017.7' into setup_py_req_fix
This commit is contained in:
commit
09cd5fc752
4 changed files with 22 additions and 3 deletions
|
@ -235,3 +235,17 @@ Defined in: State
|
|||
__sdb__
|
||||
-------
|
||||
Defined in: SDB
|
||||
|
||||
|
||||
Additional Globals
|
||||
==================
|
||||
|
||||
Defined for: Runners, Execution Modules, Wheels
|
||||
|
||||
* ``__jid__``: The job ID
|
||||
* ``__user__``: The user
|
||||
* ``__tag__``: The jid tag
|
||||
* ``__jid_event__``: A :py:class:`salt.utils.event.NamespacedEvent`.
|
||||
|
||||
:py:class:`NamespacedEvent <salt.utils.event.NamespacedEvent>` defines a single
|
||||
method :py:meth:`fire_event <salt.utils.event.NamespacedEvent.fire_event>`, that takes data and tag. The :ref:`Runner docs <runners>` has examples.
|
||||
|
|
|
@ -324,7 +324,7 @@ class SyncClientMixin(object):
|
|||
print_func=print_func
|
||||
)
|
||||
|
||||
# TODO: document these, and test that they exist
|
||||
# TODO: test that they exist
|
||||
# TODO: Other things to inject??
|
||||
func_globals = {'__jid__': jid,
|
||||
'__user__': data['user'],
|
||||
|
|
|
@ -110,7 +110,7 @@ class GemModuleTest(ModuleCase):
|
|||
gem.sources_add
|
||||
gem.sources_remove
|
||||
'''
|
||||
source = 'http://gems.github.com'
|
||||
source = 'http://gemcutter.org/'
|
||||
|
||||
self.run_function('gem.sources_add', [source])
|
||||
sources_list = self.run_function('gem.sources_list')
|
||||
|
|
|
@ -243,9 +243,15 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
|||
script_path = self.get_script_path(script)
|
||||
if not os.path.isfile(script_path):
|
||||
return False
|
||||
popen_kwargs = popen_kwargs or {}
|
||||
|
||||
if salt.utils.is_windows():
|
||||
cmd = 'python '
|
||||
if 'cwd' not in popen_kwargs:
|
||||
popen_kwargs['cwd'] = os.getcwd()
|
||||
if 'env' not in popen_kwargs:
|
||||
popen_kwargs['env'] = os.environ.copy()
|
||||
popen_kwargs['env'][b'PYTHONPATH'] = os.getcwd().encode()
|
||||
else:
|
||||
cmd = 'PYTHONPATH='
|
||||
python_path = os.environ.get('PYTHONPATH', None)
|
||||
|
@ -262,7 +268,6 @@ class ShellTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
|
|||
|
||||
tmp_file = tempfile.SpooledTemporaryFile()
|
||||
|
||||
popen_kwargs = popen_kwargs or {}
|
||||
popen_kwargs = dict({
|
||||
'shell': True,
|
||||
'stdout': tmp_file,
|
||||
|
|
Loading…
Add table
Reference in a new issue