mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add more tests to whitelist
This commit is contained in:
parent
b082f79fcb
commit
7c7353c5f6
4 changed files with 24 additions and 4 deletions
|
@ -7,12 +7,16 @@
|
|||
# Import Python libs
|
||||
from __future__ import absolute_import, print_function, unicode_literals
|
||||
import logging
|
||||
import pwd
|
||||
import grp
|
||||
try:
|
||||
import pwd
|
||||
import grp
|
||||
except ImportError:
|
||||
pwd, grp = None, None
|
||||
import random
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.case import ShellCase
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest, skip_if_not_root
|
||||
|
||||
# Import Salt libs
|
||||
|
@ -44,6 +48,7 @@ def gen_password():
|
|||
|
||||
|
||||
@skip_if_not_root
|
||||
@skipIf(pwd is None, 'Skip if no pwd module exists')
|
||||
@destructiveTest
|
||||
class AuthTest(ShellCase):
|
||||
'''
|
||||
|
|
|
@ -289,6 +289,7 @@ class CallTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMixin
|
|||
if os.path.isfile(this_minion_key):
|
||||
os.unlink(this_minion_key)
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows')
|
||||
def test_issue_7754(self):
|
||||
old_cwd = os.getcwd()
|
||||
config_dir = os.path.join(TMP, 'issue-7754')
|
||||
|
@ -325,6 +326,7 @@ class CallTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMixin
|
|||
if os.path.isdir(config_dir):
|
||||
shutil.rmtree(config_dir)
|
||||
|
||||
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows')
|
||||
def test_syslog_file_not_found(self):
|
||||
'''
|
||||
test when log_file is set to a syslog file that does not exist
|
||||
|
|
|
@ -391,7 +391,10 @@ class TestProgram(six.with_metaclass(TestProgramMeta, object)):
|
|||
# Always ensure that the test tree is searched first for python modules
|
||||
if CODE_DIR != env_pypath[0]:
|
||||
env_pypath.insert(0, CODE_DIR)
|
||||
env_delta['PYTHONPATH'] = ':'.join(env_pypath)
|
||||
if salt.utils.platform.is_windows():
|
||||
env_delta['PYTHONPATH'] = ';'.join(env_pypath)
|
||||
else:
|
||||
env_delta['PYTHONPATH'] = ':'.join(env_pypath)
|
||||
|
||||
cmd_env = dict(os.environ)
|
||||
cmd_env.update(env_delta)
|
||||
|
@ -416,7 +419,10 @@ class TestProgram(six.with_metaclass(TestProgramMeta, object)):
|
|||
|
||||
popen_kwargs['preexec_fn'] = detach_from_parent_group
|
||||
|
||||
self.argv = [self.program]
|
||||
if salt.utils.platform.is_windows():
|
||||
self.argv = ['python.exe', self.program]
|
||||
else:
|
||||
self.argv = [self.program]
|
||||
self.argv.extend(args)
|
||||
log.debug('TestProgram.run: %s Environment %s', self.argv, env_delta)
|
||||
process = subprocess.Popen(self.argv, **popen_kwargs)
|
||||
|
|
|
@ -69,7 +69,14 @@ integration.runners.test_manage
|
|||
integration.runners.test_runner_returns
|
||||
integration.runners.test_nacl
|
||||
integration.runners.test_salt
|
||||
integration.scheduler.test_eval
|
||||
integration.scheduler.test_postpone
|
||||
integration.scheduler.test_skip
|
||||
integration.sdb.test_env
|
||||
integration.shell.test_arguments
|
||||
integration.shell.test_auth
|
||||
integration.shell.test_call
|
||||
integration.shell.test_cloud
|
||||
integration.states.test_host
|
||||
integration.states.test_pip_state
|
||||
integration.states.test_pkg
|
||||
|
|
Loading…
Add table
Reference in a new issue