Add more shell integration tests to whitelist

This commit is contained in:
Daniel A. Wozniak 2018-10-02 09:55:04 -07:00
parent 48275c0072
commit 02ad722e02
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61
4 changed files with 31 additions and 0 deletions

View file

@ -31,6 +31,7 @@ from salt.ext import six
# Import salt libs
import salt.utils.files
import salt.utils.yaml
import salt.utils.platform
log = logging.getLogger(__name__)
@ -271,9 +272,12 @@ class MinionTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
for minion in minions:
minion.shutdown()
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
def test_exit_status_unknown_user(self):
'''
Ensure correct exit status when the minion is configured to run as an unknown user.
Skipped on windows because daemonization not supported
'''
minion = testprogram.TestDaemonSaltMinion(
@ -302,6 +306,7 @@ class MinionTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
minion.shutdown()
# pylint: disable=invalid-name
# @skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
def test_exit_status_unknown_argument(self):
'''
Ensure correct exit status when an unknown argument is passed to salt-minion.
@ -331,9 +336,12 @@ class MinionTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
# cause timeout exeptions and respective traceback
minion.shutdown()
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
def test_exit_status_correct_usage(self):
'''
Ensure correct exit status when salt-minion starts correctly.
Skipped on windows because daemonization not supported
'''
minion = testprogram.TestDaemonSaltMinion(

View file

@ -10,13 +10,18 @@
from __future__ import absolute_import, print_function, unicode_literals
import logging
from tests.support.unit import skipIf
# Import salt tests libs
import tests.integration.utils
from tests.integration.utils import testprogram
import salt.utils.platform
log = logging.getLogger(__name__)
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
class ProxyTest(testprogram.TestProgramCase):
'''
Various integration tests for the salt-proxy executable.
@ -25,6 +30,8 @@ class ProxyTest(testprogram.TestProgramCase):
def test_exit_status_no_proxyid(self):
'''
Ensure correct exit status when --proxyid argument is missing.
Skip on Windows because daemonization not supported
'''
proxy = testprogram.TestDaemonSaltProxy(
@ -61,6 +68,8 @@ class ProxyTest(testprogram.TestProgramCase):
def test_exit_status_unknown_user(self):
'''
Ensure correct exit status when the proxy is configured to run as an unknown user.
Skip on Windows because daemonization not supported
'''
proxy = testprogram.TestDaemonSaltProxy(
@ -92,6 +101,8 @@ class ProxyTest(testprogram.TestProgramCase):
def test_exit_status_unknown_argument(self):
'''
Ensure correct exit status when an unknown argument is passed to salt-proxy.
Skip on Windows because daemonization not supported
'''
proxy = testprogram.TestDaemonSaltProxy(
@ -120,6 +131,8 @@ class ProxyTest(testprogram.TestProgramCase):
def test_exit_status_correct_usage(self):
'''
Ensure correct exit status when salt-proxy starts correctly.
Skip on Windows because daemonization not supported
'''
proxy = testprogram.TestDaemonSaltProxy(

View file

@ -15,12 +15,14 @@ from tests.support.case import ShellCase
from tests.support.paths import TMP
from tests.support.mixins import ShellCaseCommonTestsMixin
from tests.support.helpers import skip_if_not_root
from tests.support.unit import skipIf
# Import Salt libs
import salt.utils.files
import salt.utils.platform
import salt.utils.yaml
USERA = 'saltdev'
USERA_PWD = 'saltdev'
HASHED_USERA_PWD = '$6$SALTsalt$ZZFD90fKFWq8AGmmX0L3uBtS9fXL62SrTk5zcnQ6EkD6zoiM3kB88G1Zvs0xm/gZ7WXJRs5nsTBybUvGSqZkT.'
@ -90,7 +92,11 @@ class RunTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMixin)
data = self.run_run('-d virt.list foo', catch_stderr=True)
self.assertIn('You can only get documentation for one method at one time', '\n'.join(data[1]))
@skipIf(salt.utils.platform.is_windows(), 'Skip on Windows OS')
def test_issue_7754(self):
'''
Skip on windows because syslog not available
'''
old_cwd = os.getcwd()
config_dir = os.path.join(TMP, 'issue-7754')
if not os.path.isdir(config_dir):

View file

@ -82,6 +82,10 @@ integration.shell.test_enabled
integration.shell.test_key
integration.shell.test_master
integration.shell.test_master_tops
integration.shell.test_matcher
integration.shell.test_minion
integration.shell.test_proxy
integration.shell.test_runner
integration.states.test_host
integration.states.test_pip_state
integration.states.test_pkg