Skip tests not valid on windows

This commit is contained in:
Daniel Wozniak 2018-10-01 16:37:43 -07:00 committed by Daniel A. Wozniak
parent a3897290e8
commit e5edff4154
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61
2 changed files with 7 additions and 0 deletions

View file

@ -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

View file

@ -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