mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Import for the original module
This commit is contained in:
parent
b94992f544
commit
785698d2ce
32 changed files with 72 additions and 70 deletions
|
@ -438,6 +438,7 @@ to test states:
|
|||
import shutil
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
import tests.integration as integration
|
||||
|
||||
# Import salt libs
|
||||
|
@ -446,7 +447,7 @@ to test states:
|
|||
HFILE = os.path.join(integration.TMP, 'hosts')
|
||||
|
||||
|
||||
class HostTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class HostTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the host state
|
||||
'''
|
||||
|
|
|
@ -11,6 +11,7 @@ import logging
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -28,8 +29,7 @@ except ImportError:
|
|||
'Please install keystoneclient and a keystone server before running'
|
||||
'openstack integration tests.'
|
||||
)
|
||||
class OpenstackTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class OpenstackTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the keystone state
|
||||
'''
|
||||
|
|
|
@ -8,6 +8,7 @@ import logging
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -34,8 +35,7 @@ if not salt.utils.which('mysqladmin'):
|
|||
'Please install MySQL bindings and a MySQL Server before running'
|
||||
'MySQL integration tests.'
|
||||
)
|
||||
class MysqlModuleDbTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class MysqlModuleDbTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Module testing database creation on a real MySQL Server.
|
||||
'''
|
||||
|
@ -615,8 +615,7 @@ class MysqlModuleDbTest(integration.ModuleCase,
|
|||
'Please install MySQL bindings and a MySQL Server before running'
|
||||
'MySQL integration tests.'
|
||||
)
|
||||
class MysqlModuleUserTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class MysqlModuleUserTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
User Creation and connection tests
|
||||
'''
|
||||
|
@ -1269,8 +1268,7 @@ class MysqlModuleUserTest(integration.ModuleCase,
|
|||
'Please install MySQL bindings and a MySQL Server before running'
|
||||
'MySQL integration tests.'
|
||||
)
|
||||
class MysqlModuleUserGrantTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class MysqlModuleUserGrantTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
User Creation and connection tests
|
||||
'''
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import absolute_import
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
from tests.support.helpers import (
|
||||
destructiveTest,
|
||||
requires_network,
|
||||
|
@ -11,8 +12,7 @@ from tests.support.helpers import (
|
|||
)
|
||||
|
||||
|
||||
class PkgModuleTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class PkgModuleTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the pkg module
|
||||
'''
|
||||
|
|
|
@ -5,10 +5,10 @@ from __future__ import absolute_import, print_function
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
|
||||
class PublishModuleTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class PublishModuleTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the publish module
|
||||
'''
|
||||
|
|
|
@ -11,6 +11,7 @@ import time
|
|||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -20,8 +21,7 @@ from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
|||
import salt.ext.six as six
|
||||
|
||||
|
||||
class StateModuleTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class StateModuleTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the state module
|
||||
'''
|
||||
|
|
|
@ -8,6 +8,7 @@ import textwrap
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -15,8 +16,7 @@ import salt.utils
|
|||
STATE_DIR = os.path.join(integration.FILES, 'file', 'base')
|
||||
|
||||
|
||||
class EnvTestCase(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class EnvTestCase(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def setUp(self):
|
||||
self.state_name = 'test_sdb_env'
|
||||
|
|
|
@ -11,6 +11,7 @@ import os
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
NO_ALTERNATIVES = False
|
||||
if not os.path.exists('/etc/alternatives'):
|
||||
|
@ -18,8 +19,7 @@ if not os.path.exists('/etc/alternatives'):
|
|||
|
||||
|
||||
@skipIf(NO_ALTERNATIVES, '/etc/alternatives does not exist on the system')
|
||||
class AlterantivesStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class AlterantivesStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
@destructiveTest
|
||||
def test_install_set_and_remove(self):
|
||||
ret = self.run_state('alternatives.set', name='alt-test', path='/bin/true')
|
||||
|
|
|
@ -17,6 +17,7 @@ import tornado.web
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import get_unused_localhost_port
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -34,8 +35,7 @@ ARCHIVE_TAR_HASH = 'md5=7643861ac07c30fe7d2310e9f25ca514'
|
|||
STATE_DIR = os.path.join(integration.FILES, 'file', 'base')
|
||||
|
||||
|
||||
class ArchiveTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class ArchiveTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the archive state
|
||||
'''
|
||||
|
|
|
@ -10,6 +10,7 @@ import re
|
|||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import 3rd-party libs
|
||||
NO_BOTO_MODULE = True
|
||||
|
@ -34,8 +35,7 @@ except ImportError:
|
|||
BOTO_NOT_CONFIGURED,
|
||||
'Please setup boto AWS credentials before running boto integration tests.'
|
||||
)
|
||||
class BotoSNSTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class BotoSNSTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def setUp(self):
|
||||
# The name of the topic you want to create.
|
||||
|
|
|
@ -10,14 +10,14 @@ import json
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
@skipIf(salt.utils.which('bower') is None, 'bower not installed')
|
||||
class BowerStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class BowerStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
@destructiveTest
|
||||
def test_bower_installed_removed(self):
|
||||
|
|
|
@ -12,14 +12,15 @@ import tempfile
|
|||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.paths import TMP_STATE_TREE
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
IS_WINDOWS = salt.utils.is_windows()
|
||||
|
||||
|
||||
class CMDTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class CMDTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the cmd state
|
||||
'''
|
||||
|
@ -40,8 +41,7 @@ class CMDTest(integration.ModuleCase,
|
|||
self.assertSaltNoneReturn(ret)
|
||||
|
||||
|
||||
class CMDRunRedirectTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class CMDRunRedirectTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the cmd state of run_redirect
|
||||
'''
|
||||
|
@ -158,8 +158,7 @@ class CMDRunRedirectTest(integration.ModuleCase,
|
|||
self.assertTrue(ret[state_key]['result'])
|
||||
|
||||
|
||||
class CMDRunWatchTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class CMDRunWatchTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the cmd state of run_watch
|
||||
'''
|
||||
|
|
|
@ -21,6 +21,7 @@ from tests.support.unit import skipIf
|
|||
import salt.utils
|
||||
import tests.integration as integration
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import 3rd-party libs
|
||||
from salt.ext.six.moves import range # pylint: disable=import-error,redefined-builtin
|
||||
|
@ -49,8 +50,7 @@ def with_random_name(func):
|
|||
@destructiveTest
|
||||
@skipIf(not salt.utils.which('busybox'), 'Busybox not installed')
|
||||
@skipIf(not salt.utils.which('dockerd'), 'Docker not installed')
|
||||
class DockerContainerTestCase(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class DockerContainerTestCase(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Test docker_container states
|
||||
'''
|
||||
|
|
|
@ -30,6 +30,7 @@ import tests.integration as integration
|
|||
from tests.support.unit import skipIf
|
||||
from tests.support.paths import FILES, TMP, TMP_STATE_TREE
|
||||
from tests.support.helpers import skip_if_not_root, with_system_user_and_group
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -139,7 +140,7 @@ def _test_managed_file_mode_keep_helper(testcase, local=False):
|
|||
os.chmod(grail_fs_path, grail_fs_mode)
|
||||
|
||||
|
||||
class FileTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class FileTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the file state
|
||||
'''
|
||||
|
@ -2431,7 +2432,7 @@ FILE_SOURCE = 'http://localhost:{0}/grail/scene33'.format(PORT)
|
|||
FILE_HASH = 'd2feb3beb323c79fc7a0f44f1408b4a3'
|
||||
|
||||
|
||||
class RemoteFileTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class RemoteFileTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Uses a local tornado webserver to test http(s) file.managed states with and
|
||||
without skip_verify
|
||||
|
|
|
@ -15,13 +15,14 @@ import tempfile
|
|||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.helpers import skip_if_binaries_missing
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
@skip_if_binaries_missing('git')
|
||||
class GitTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class GitTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the git state
|
||||
'''
|
||||
|
@ -462,7 +463,7 @@ class GitTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
|||
|
||||
|
||||
@skip_if_binaries_missing('git')
|
||||
class LocalRepoGitTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class LocalRepoGitTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Tests which do no require connectivity to github.com
|
||||
'''
|
||||
|
|
|
@ -10,6 +10,7 @@ import shutil
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -17,7 +18,7 @@ import salt.utils
|
|||
HFILE = os.path.join(integration.TMP, 'hosts')
|
||||
|
||||
|
||||
class HostTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class HostTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the host state
|
||||
'''
|
||||
|
|
|
@ -11,6 +11,7 @@ import logging
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -26,8 +27,7 @@ except ImportError:
|
|||
'Please install keystoneclient and a keystone server before running'
|
||||
'keystone integration tests.'
|
||||
)
|
||||
class KeystoneStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class KeystoneStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the keystone state
|
||||
'''
|
||||
|
|
|
@ -11,6 +11,7 @@ import logging
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -34,8 +35,7 @@ if not salt.utils.which('mysqladmin'):
|
|||
'Please install MySQL bindings and a MySQL Server before running'
|
||||
'MySQL integration tests.'
|
||||
)
|
||||
class MysqlDatabaseStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class MysqlDatabaseStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the mysql_database state
|
||||
'''
|
||||
|
@ -240,8 +240,7 @@ class MysqlDatabaseStateTest(integration.ModuleCase,
|
|||
'Please install MySQL bindings and a MySQL Server before running'
|
||||
'MySQL integration tests.'
|
||||
)
|
||||
class MysqlGrantsStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class MysqlGrantsStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the mysql_grants states
|
||||
'''
|
||||
|
|
|
@ -11,10 +11,11 @@ from __future__ import absolute_import
|
|||
# Import salt testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
|
||||
@destructiveTest
|
||||
class NetworkTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class NetworkTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate network state module
|
||||
'''
|
||||
|
|
|
@ -11,13 +11,14 @@ from __future__ import absolute_import
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest, requires_network
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
||||
|
||||
@skipIf(salt.utils.which('npm') is None, 'npm not installed')
|
||||
class NpmStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class NpmStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
@requires_network()
|
||||
@destructiveTest
|
||||
|
|
|
@ -16,6 +16,7 @@ import glob
|
|||
import shutil
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import (
|
||||
destructiveTest,
|
||||
|
@ -33,7 +34,7 @@ import salt.ext.six as six
|
|||
|
||||
|
||||
@skipIf(salt.utils.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
|
||||
class PipStateTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class PipStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
def test_pip_installed_removed(self):
|
||||
'''
|
||||
|
|
|
@ -11,6 +11,7 @@ import time
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import (
|
||||
destructiveTest,
|
||||
|
@ -144,8 +145,7 @@ def latest_version(run_function, *names):
|
|||
|
||||
@destructiveTest
|
||||
@requires_salt_modules('pkg.version', 'pkg.latest_version')
|
||||
class PkgTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class PkgTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
pkg.installed state tests
|
||||
'''
|
||||
|
|
|
@ -8,6 +8,7 @@ from __future__ import absolute_import
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import (
|
||||
destructiveTest,
|
||||
|
@ -21,8 +22,7 @@ import salt.utils
|
|||
import salt.ext.six as six
|
||||
|
||||
|
||||
class PkgrepoTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class PkgrepoTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
pkgrepo state tests
|
||||
'''
|
||||
|
|
|
@ -8,10 +8,10 @@ import os
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
|
||||
class RabbitUserTestCase(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class RabbitUserTestCase(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the rabbitmq user states.
|
||||
'''
|
||||
|
|
|
@ -9,10 +9,10 @@ import os
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
|
||||
class RabbitVHostTestCase(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class RabbitVHostTestCase(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the rabbitmq virtual host states.
|
||||
'''
|
||||
|
|
|
@ -9,6 +9,7 @@ from __future__ import absolute_import
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -19,8 +20,7 @@ SERVICE_NAME = 'crond'
|
|||
|
||||
@destructiveTest
|
||||
@skipIf(salt.utils.which('crond') is None, 'crond not installed')
|
||||
class ServiceTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class ServiceTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the service state
|
||||
'''
|
||||
|
|
|
@ -10,6 +10,7 @@ import shutil
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import (
|
||||
destructiveTest,
|
||||
|
@ -26,8 +27,7 @@ GITHUB_IP = '192.30.253.113'
|
|||
|
||||
|
||||
@skip_if_binaries_missing(['ssh', 'ssh-keygen'], check_all=True)
|
||||
class SSHKnownHostsStateTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class SSHKnownHostsStateTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the ssh state
|
||||
'''
|
||||
|
@ -155,8 +155,7 @@ class SSHKnownHostsStateTest(integration.ModuleCase,
|
|||
self.assertSaltTrueReturn(ret)
|
||||
|
||||
|
||||
class SSHAuthStateTests(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class SSHAuthStateTests(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
|
|
|
@ -13,6 +13,7 @@ import subprocess
|
|||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -25,8 +26,7 @@ import salt.ext.six as six
|
|||
@skipIf(six.PY3, 'supervisor does not work under python 3')
|
||||
@skipIf(salt.utils.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
|
||||
@skipIf(salt.utils.which('supervisorctl') is None, 'supervisord not installed')
|
||||
class SupervisordTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class SupervisordTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the supervisord states.
|
||||
'''
|
||||
|
|
|
@ -12,9 +12,10 @@ import socket
|
|||
|
||||
# Import Salt Testing libs
|
||||
import tests.integration as integration
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
|
||||
class SvnTest(integration.ModuleCase, integration.SaltReturnAssertsMixin):
|
||||
class SvnTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
Validate the svn state
|
||||
'''
|
||||
|
|
|
@ -18,6 +18,7 @@ import grp
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest, requires_system_grains
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -36,8 +37,7 @@ else:
|
|||
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
class UserTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class UserTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
'''
|
||||
test for user absent
|
||||
'''
|
||||
|
|
|
@ -16,6 +16,7 @@ import shutil
|
|||
import tests.integration as integration
|
||||
from tests.support.unit import skipIf
|
||||
from tests.support.helpers import destructiveTest
|
||||
from tests.support.mixins import SaltReturnAssertsMixin
|
||||
|
||||
# Import salt libs
|
||||
import salt.utils
|
||||
|
@ -23,8 +24,7 @@ from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
|||
|
||||
|
||||
@skipIf(salt.utils.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
|
||||
class VirtualenvTest(integration.ModuleCase,
|
||||
integration.SaltReturnAssertsMixin):
|
||||
class VirtualenvTest(integration.ModuleCase, SaltReturnAssertsMixin):
|
||||
@destructiveTest
|
||||
@skipIf(os.geteuid() != 0, 'you must be root to run this test')
|
||||
def test_issue_1959_virtualenv_runas(self):
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.integration import SaltReturnAssertsMixin
|
||||
from tests.support.mixins import LoaderModuleMockMixin
|
||||
from tests.support.mixins import LoaderModuleMockMixin, SaltReturnAssertsMixin
|
||||
from tests.support.unit import skipIf, TestCase
|
||||
from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue