mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip tests not valid on windows
This commit is contained in:
parent
9debf29e39
commit
6fbadd7811
2 changed files with 7 additions and 0 deletions
|
@ -8,8 +8,10 @@ import textwrap
|
|||
# Import Salt Testing libs
|
||||
from tests.support.case import ModuleCase
|
||||
from tests.support.paths import FILES
|
||||
from tests.support.unit import skipIf
|
||||
|
||||
# Import Salt Libs
|
||||
import salt.utils.platform
|
||||
import salt.utils.files
|
||||
|
||||
|
||||
|
@ -25,6 +27,7 @@ class EnabledTest(ModuleCase):
|
|||
"export SALTY_VARIABLE='saltines' && echo $SALTY_VARIABLE ; "
|
||||
"echo duh &> /dev/null")
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
|
||||
def test_shell_default_enabled(self):
|
||||
'''
|
||||
ensure that python_shell defaults to True for cmd.run
|
||||
|
@ -33,6 +36,7 @@ class EnabledTest(ModuleCase):
|
|||
ret = self.run_function('cmd.run', [self.cmd])
|
||||
self.assertEqual(ret.strip(), enabled_ret)
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
|
||||
def test_shell_disabled(self):
|
||||
'''
|
||||
test shell disabled output for cmd.run
|
||||
|
@ -42,6 +46,7 @@ class EnabledTest(ModuleCase):
|
|||
ret = self.run_function('cmd.run', [self.cmd], python_shell=False)
|
||||
self.assertEqual(ret, disabled_ret)
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
|
||||
def test_template_shell(self):
|
||||
'''
|
||||
Test cmd.shell works correctly when using a template.
|
||||
|
@ -72,6 +77,7 @@ class EnabledTest(ModuleCase):
|
|||
finally:
|
||||
os.remove(state_file)
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
|
||||
def test_template_default_disabled(self):
|
||||
'''
|
||||
test shell disabled output for templates (python_shell=False is the default
|
||||
|
|
|
@ -78,6 +78,7 @@ integration.shell.test_auth
|
|||
integration.shell.test_call
|
||||
integration.shell.test_cloud
|
||||
integration.shell.test_cp
|
||||
integration.shell.test_enabled
|
||||
integration.states.test_host
|
||||
integration.states.test_pip_state
|
||||
integration.states.test_pkg
|
||||
|
|
Loading…
Add table
Reference in a new issue