[3006.x] rebase test labels (#64053)

* changelog

* add actions

* add tools

* typo

* add some debug

* pulls vs push

* fire on pullr only

* test port part 1

* part 2

* part 3

* part 4

* fix double run slow

* clean up

* update types

* reg workflow

* reg workflow
This commit is contained in:
Charles McMarrow 2023-04-15 20:19:58 -05:00 committed by GitHub
parent db6d40a880
commit 103063d3fb
109 changed files with 295 additions and 39 deletions

View file

@ -167,6 +167,46 @@ def pytest_addoption(parser):
"may be insecure! Default: False"
),
)
test_selection_group.addoption(
"--no-fast",
"--no-fast-tests",
dest="fast",
action="store_false",
default=True,
help="Don't run salt-fast tests. Default: %(default)s",
)
test_selection_group.addoption(
"--run-slow",
"--slow",
"--slow-tests",
dest="slow",
action="store_true",
default=False,
help="Run slow tests. Default: %(default)s",
)
test_selection_group.addoption(
"--core",
"--core-tests",
dest="core",
action="store_true",
default=False,
help=(
"Run salt-core tests. These tests test the engine of salt! "
"Default: %(default)s"
),
)
test_selection_group.addoption(
"--flaky",
"--flaky-jail",
dest="flaky",
action="store_true",
default=False,
help=(
"Run salt-flaky jail tests. These tests are in jail for being flaky! "
"One day they will be made not flaky."
"Default: %(default)s"
),
)
test_selection_group.addoption(
"--proxy",
"--proxy-tests",
@ -175,12 +215,6 @@ def pytest_addoption(parser):
default=False,
help="Run proxy tests (DEPRECATED)",
)
test_selection_group.addoption(
"--run-slow",
action="store_true",
default=False,
help="Run slow tests.",
)
output_options_group = parser.getgroup("Output Options")
output_options_group.addoption(
@ -269,6 +303,16 @@ def pytest_configure(config):
"slow_test: Mark test as being slow. These tests are skipped by default unless"
" `--run-slow` is passed",
)
config.addinivalue_line(
"markers",
"core_test: Mark test as being core. These tests are skipped by default unless"
" `--core-tests` is passed",
)
config.addinivalue_line(
"markers",
"flaky_jail: Mark test as being jlaky. These tests are skipped by default unless"
" `--flaky-jail` is passed",
)
config.addinivalue_line(
"markers",
"async_timeout: Timeout, in seconds, for asynchronous test functions(`async def`)",
@ -534,10 +578,34 @@ def pytest_runtest_setup(item):
item._skipped_by_mark = True
pytest.skip(PRE_PYTEST_SKIP_REASON)
if item.get_closest_marker("core_test"):
if not item.config.getoption("--core-tests"):
raise pytest.skip.Exception(
"Core tests are disabled, pass '--core-tests' to enable them.",
_use_item_location=True,
)
if item.get_closest_marker("slow_test"):
if item.config.getoption("--run-slow") is False:
item._skipped_by_mark = True
pytest.skip("Slow tests are disabled!")
if not item.config.getoption("--slow-tests"):
raise pytest.skip.Exception(
"Slow tests are disabled, pass '--run-slow' to enable them.",
_use_item_location=True,
)
if item.get_closest_marker("flaky_jail"):
if not item.config.getoption("--flaky-jail"):
raise pytest.skip.Exception(
"flaky jail tests are disabled, pass '--flaky-jail' to enable them.",
_use_item_location=True,
)
if (
not item.get_closest_marker("slow_test")
and not item.get_closest_marker("core_test")
and not item.get_closest_marker("flaky_jail")
):
if not item.config.getoption("--no-fast-tests"):
raise pytest.skip.Exception(
"Fast tests are disabled, dont pass '--no-fast-tests' to enable them.",
_use_item_location=True,
)
requires_sshd_server_marker = item.get_closest_marker("requires_sshd_server")
if requires_sshd_server_marker is not None:

View file

@ -9,6 +9,7 @@ from tests.support.sminion import create_sminion
@pytest.mark.skip_unless_on_windows
@pytest.mark.windows_whitelisted
@pytest.mark.destructive_test
@pytest.mark.slow_test
class ChocolateyModuleTest(ModuleCase):
"""
Validate Chocolatey module

View file

@ -15,6 +15,7 @@ from tests.support.case import ModuleCase
@pytest.mark.skip_if_not_root
@pytest.mark.skip_unless_on_linux
@pytest.mark.slow_test
class ShadowModuleTest(ModuleCase):
"""
Validate the linux shadow system module

View file

@ -14,6 +14,7 @@ class StatusModuleTest(ModuleCase):
@pytest.mark.skip_on_windows
@pytest.mark.flaky(max_runs=4)
@pytest.mark.slow_test
def test_status_pid(self):
"""
status.pid

View file

@ -6,6 +6,7 @@ from tests.support.case import ModuleCase
@pytest.mark.flaky(max_runs=4)
@pytest.mark.skip_unless_on_windows
@pytest.mark.windows_whitelisted
@pytest.mark.slow_test
class NTPTest(ModuleCase):
"""
Validate windows ntp module

View file

@ -17,6 +17,7 @@ SSH_SLS_FILE = "/tmp/salt_test_file"
log = logging.getLogger(__name__)
@pytest.mark.slow_test
class SSHStateTest(SSHCase):
"""
testing the state system with salt-ssh

View file

@ -13,6 +13,7 @@ from tests.support.mixins import SaltReturnAssertsMixin
@pytest.mark.skipif(salt.modules.lxd.HAS_PYLXD is False, reason="pylxd not installed")
@pytest.mark.skip_if_binaries_missing("lxd", reason="LXD not installed")
@pytest.mark.skip_if_binaries_missing("lxc", reason="LXC not installed")
@pytest.mark.slow_test
class LxdTestCase(ModuleCase, SaltReturnAssertsMixin):
@pytest.mark.flaky(max_runs=4)
def test_01__init_lxd(self):

View file

@ -13,6 +13,7 @@ from tests.support.mixins import SaltReturnAssertsMixin
@pytest.mark.skipif(salt.modules.lxd.HAS_PYLXD is False, reason="pylxd not installed")
@pytest.mark.skip_if_binaries_missing("lxd", reason="LXD not installed")
@pytest.mark.skip_if_binaries_missing("lxc", reason="LXC not installed")
@pytest.mark.slow_test
class LxdContainerTestCase(ModuleCase, SaltReturnAssertsMixin):
def setUp(self):
self.run_state(

View file

@ -67,5 +67,6 @@ def cache(minion_opts, consul_container):
return cache
@pytest.mark.slow_test
def test_caching(subtests, cache):
run_common_cache_tests(subtests, cache)

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -4,6 +4,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -4,6 +4,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -4,6 +4,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -4,6 +4,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -6,6 +6,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -6,6 +6,7 @@ from . import normalize_ret
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -18,6 +18,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.core_test,
]

View file

@ -9,6 +9,7 @@ pytestmark = [
check_all=True,
reason="ansible is not installed",
),
pytest.mark.slow_test,
]

View file

@ -17,6 +17,7 @@ from tests.support.mock import Mock, patch
pytestmark = [
pytest.mark.skip_if_binaries_missing("apt-cache", "grep"),
pytest.mark.slow_test,
]
KEY_FILES = (

View file

@ -14,6 +14,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
pytest.mark.slow_test,
]

View file

@ -21,6 +21,7 @@ from tests.support.helpers import VirtualEnv
),
)
@pytest.mark.requires_network
@pytest.mark.slow_test
def test_list_available_packages(modules, pip_version, tmp_path):
with VirtualEnv(venv_dir=tmp_path, pip_requirement=pip_version) as virtualenv:
virtualenv.install("-U", pip_version)

View file

@ -47,6 +47,7 @@ def get_top(configure_mocks):
yield get_top
@pytest.mark.slow_test
def test__get_top_file_envs(modules, get_top, destroy):
"""
Ensure we cleanup objects created by saltutil._get_top_file_envs #60449

View file

@ -9,7 +9,10 @@ import pytest
import salt.utils.files
pytestmark = [pytest.mark.skip_unless_on_linux]
pytestmark = [
pytest.mark.skip_unless_on_linux,
pytest.mark.slow_test,
]
log = logging.getLogger(__name__)

View file

@ -10,6 +10,7 @@ import salt.utils.files
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -10,6 +10,7 @@ import salt.exceptions
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -21,6 +21,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.skipif(not HAS_WIN32, reason="Requires Win32 libraries"),
pytest.mark.slow_test,
]

View file

@ -6,6 +6,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -3,6 +3,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -10,6 +10,7 @@ from packaging import version
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -6,6 +6,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -6,6 +6,7 @@ import salt.utils.win_dacl as win_dacl
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -10,6 +10,7 @@ from tests.support.helpers import dedent
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.slow_test,
]

View file

@ -16,6 +16,7 @@ except NameError:
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -2,6 +2,7 @@ import pytest
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.slow_test,
]

View file

@ -9,6 +9,7 @@ import salt.utils.path
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.slow_test,
]

View file

@ -21,6 +21,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.destructive_test,
pytest.mark.skip_if_not_root,
pytest.mark.slow_test,
]

View file

@ -113,6 +113,7 @@ def web_root(tmp_path_factory):
shutil.rmtree(str(_web_root), ignore_errors=True)
@pytest.mark.slow_test
def test_archive_extracted_web_source_etag_operation(
modules, states, free_port, web_root, minion_opts
):

View file

@ -13,6 +13,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.skip_if_binaries_missing("docker", "dockerd", check_all=False),
pytest.mark.slow_test,
]

View file

@ -113,6 +113,7 @@ def web_root(tmp_path_factory):
shutil.rmtree(str(_web_root), ignore_errors=True)
@pytest.mark.slow_test
def test_file_managed_web_source_etag_operation(
states, free_port, web_root, minion_opts
):

View file

@ -7,7 +7,7 @@ from tests.support.helpers import dedent
log = logging.getLogger(__name__)
@pytest.mark.slow_test
@pytest.mark.core_test
def test_issue_58763(tmp_path, modules, state_tree, caplog):
venv_dir = tmp_path / "issue-2028-pip-installed"
@ -39,7 +39,7 @@ def test_issue_58763(tmp_path, modules, state_tree, caplog):
assert "Using new style module.run syntax: run_new" in caplog.messages
@pytest.mark.slow_test
@pytest.mark.core_test
def test_issue_58763_a(tmp_path, modules, state_tree, caplog):
venv_dir = tmp_path / "issue-2028-pip-installed"
@ -65,7 +65,7 @@ def test_issue_58763_a(tmp_path, modules, state_tree, caplog):
)
@pytest.mark.slow_test
@pytest.mark.core_test
def test_issue_58763_b(tmp_path, modules, state_tree, caplog):
venv_dir = tmp_path / "issue-2028-pip-installed"
@ -87,7 +87,7 @@ def test_issue_58763_b(tmp_path, modules, state_tree, caplog):
assert "Detected legacy module.run syntax: test.ping" in caplog.messages
@pytest.mark.slow_test
@pytest.mark.core_test
def test_issue_62988_a(tmp_path, modules, state_tree, caplog):
venv_dir = tmp_path / "issue-2028-pip-installed"
@ -117,7 +117,7 @@ def test_issue_62988_a(tmp_path, modules, state_tree, caplog):
assert "Using new style module.run syntax: run_new" in caplog.messages
@pytest.mark.slow_test
@pytest.mark.core_test
def test_issue_62988_b(tmp_path, modules, state_tree, caplog):
venv_dir = tmp_path / "issue-2028-pip-installed"

View file

@ -174,6 +174,7 @@ def latest_version(ctx, modules):
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_001_installed(modules, states, PKG_TARGETS):
"""
This is a destructive test as it installs and then removes a package
@ -194,6 +195,7 @@ def test_pkg_001_installed(modules, states, PKG_TARGETS):
@pytest.mark.usefixtures("VERSION_SPEC_SUPPORTED")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_002_installed_with_version(PKG_TARGETS, states, latest_version):
"""
This is a destructive test as it installs and then removes a package
@ -213,6 +215,7 @@ def test_pkg_002_installed_with_version(PKG_TARGETS, states, latest_version):
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_003_installed_multipkg(PKG_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes two packages
@ -236,6 +239,7 @@ def test_pkg_003_installed_multipkg(PKG_TARGETS, modules, states):
@pytest.mark.usefixtures("VERSION_SPEC_SUPPORTED")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_004_installed_multipkg_with_version(PKG_TARGETS, latest_version, states):
"""
This is a destructive test as it installs and then removes two packages
@ -259,6 +263,7 @@ def test_pkg_004_installed_multipkg_with_version(PKG_TARGETS, latest_version, st
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_005_installed_32bit(PKG_32_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes a package
@ -283,6 +288,7 @@ def test_pkg_005_installed_32bit(PKG_32_TARGETS, modules, states):
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_006_installed_32bit_with_version(PKG_32_TARGETS, latest_version, states):
"""
This is a destructive test as it installs and then removes a package
@ -307,6 +313,7 @@ def test_pkg_006_installed_32bit_with_version(PKG_32_TARGETS, latest_version, st
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_007_with_dot_in_pkgname(PKG_DOT_TARGETS, latest_version, states):
"""
This tests for the regression found in the following issue:
@ -329,6 +336,7 @@ def test_pkg_007_with_dot_in_pkgname(PKG_DOT_TARGETS, latest_version, states):
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_008_epoch_in_version(PKG_EPOCH_TARGETS, latest_version, states):
"""
This tests for the regression found in the following issue:
@ -455,6 +463,7 @@ def test_pkg_011_latest_only_upgrade(
@pytest.mark.usefixtures("WILDCARDS_SUPPORTED")
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_012_installed_with_wildcard_version(PKG_TARGETS, states, modules):
"""
This is a destructive test as it installs and then removes a package
@ -502,6 +511,7 @@ def test_pkg_012_installed_with_wildcard_version(PKG_TARGETS, states, modules):
@pytest.mark.requires_salt_modules("pkg.version", "pkg.latest_version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_013_installed_with_comparison_operator(
grains, PKG_TARGETS, states, modules
):
@ -540,6 +550,7 @@ def test_pkg_013_installed_with_comparison_operator(
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_014_installed_missing_release(grains, PKG_TARGETS, states, modules):
"""
Tests that a version number missing the release portion still resolves
@ -572,6 +583,7 @@ def test_pkg_014_installed_missing_release(grains, PKG_TARGETS, states, modules)
"pkg.hold", "pkg.unhold", "pkg.version", "pkg.list_pkgs"
)
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_015_installed_held(grains, modules, states, PKG_TARGETS):
"""
Tests that a package can be held even when the package is already installed.
@ -649,6 +661,7 @@ def test_pkg_015_installed_held(grains, modules, states, PKG_TARGETS):
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_016_conditionally_ignore_epoch(PKG_EPOCH_TARGETS, latest_version, states):
"""
See
@ -753,6 +766,7 @@ def test_pkg_017_installed_held_equals_false(grains, modules, states, PKG_TARGET
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_cap_001_installed(PKG_CAP_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes a package
@ -788,6 +802,7 @@ def test_pkg_cap_001_installed(PKG_CAP_TARGETS, modules, states):
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_cap_002_already_installed(PKG_CAP_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes a package
@ -829,6 +844,7 @@ def test_pkg_cap_002_already_installed(PKG_CAP_TARGETS, modules, states):
@pytest.mark.usefixtures("VERSION_SPEC_SUPPORTED")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_cap_003_installed_multipkg_with_version(
PKG_CAP_TARGETS,
PKG_TARGETS,
@ -891,6 +907,7 @@ def test_pkg_cap_003_installed_multipkg_with_version(
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.latest", "pkg.removed")
@pytest.mark.slow_test
def test_pkg_cap_004_latest(PKG_CAP_TARGETS, modules, states):
"""
This tests pkg.latest with a package that has no epoch (or a zero
@ -930,6 +947,7 @@ def test_pkg_cap_004_latest(PKG_CAP_TARGETS, modules, states):
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed", "pkg.downloaded")
@pytest.mark.slow_test
def test_pkg_cap_005_downloaded(PKG_CAP_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes a package
@ -963,6 +981,7 @@ def test_pkg_cap_005_downloaded(PKG_CAP_TARGETS, modules, states):
@pytest.mark.requires_salt_modules("pkg.version")
@pytest.mark.requires_salt_states("pkg.installed", "pkg.removed", "pkg.uptodate")
@pytest.mark.slow_test
def test_pkg_cap_006_uptodate(PKG_CAP_TARGETS, modules, states):
"""
This is a destructive test as it installs and then removes a package

View file

@ -76,6 +76,7 @@ def existing_account():
yield _account
@pytest.mark.slow_test
def test_user_absent(states):
"""
Test user.absent with a non existing account

View file

@ -15,6 +15,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_if_binaries_missing("dockerd"),
pytest.mark.slow_test,
]

View file

@ -15,6 +15,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -8,6 +8,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -10,6 +10,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -9,6 +9,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -23,7 +23,8 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.skip_on_spawning_platform(
reason="These tests are currently broken on spawning platforms. Need to be rewritten.",
)
),
pytest.mark.slow_test,
]

View file

@ -2,6 +2,7 @@ import pytest
@pytest.fixture(scope="package")
@pytest.mark.core_test
def salt_eauth_account(salt_eauth_account_factory):
with salt_eauth_account_factory as account:
yield account

View file

@ -8,7 +8,7 @@ import salt.utils.platform
pytestmark = [
pytest.mark.windows_whitelisted,
# pytest.mark.slow_test,
pytest.mark.core_test,
]

View file

@ -5,7 +5,7 @@ import pytest
import salt.defaults.exitcodes
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -19,7 +19,7 @@ import salt.utils.path
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -5,7 +5,7 @@ import pytest
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.skip_if_not_root,
pytest.mark.destructive_test,
pytest.mark.skip_on_windows,

View file

@ -15,7 +15,7 @@ import salt.utils.yaml
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -34,6 +34,7 @@ def dest_testfile():
@pytest.mark.slow_test
@pytest.mark.windows_whitelisted
@pytest.mark.core_test
def test_cp_testfile(salt_minion, salt_cp_cli, source_testfile, dest_testfile):
"""
test salt-cp

View file

@ -18,7 +18,8 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.skip_on_spawning_platform(
reason="Deltaproxy minions do not currently work on spawning platforms.",
)
),
pytest.mark.core_test,
]

View file

@ -12,7 +12,7 @@ import salt.utils.pycrypto
import salt.utils.yaml
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -8,7 +8,7 @@ import salt.defaults.exitcodes
from tests.support.helpers import PRE_PYTEST_SKIP_REASON
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -9,7 +9,7 @@ import salt.defaults.exitcodes
from tests.support.helpers import PRE_PYTEST_SKIP_REASON
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -25,7 +25,7 @@ def proxy_minion_id(salt_master):
pytest.helpers.remove_stale_minion_key(salt_master, _proxy_minion_id)
@pytest.mark.slow_test
@pytest.mark.core_test
def test_exit_status_no_proxyid(salt_master, proxy_minion_id):
"""
Ensure correct exit status when --proxyid argument is missing.
@ -42,6 +42,7 @@ def test_exit_status_no_proxyid(salt_master, proxy_minion_id):
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
@pytest.mark.core_test
def test_exit_status_unknown_user(salt_master, proxy_minion_id):
"""
Ensure correct exit status when the proxy is configured to run as an
@ -57,7 +58,7 @@ def test_exit_status_unknown_user(salt_master, proxy_minion_id):
assert "The user is not available." in exc.value.process_result.stderr
@pytest.mark.slow_test
@pytest.mark.core_test
def test_exit_status_unknown_argument(salt_master, proxy_minion_id):
"""
Ensure correct exit status when an unknown argument is passed to

View file

@ -9,7 +9,7 @@ import salt.utils.pycrypto
import salt.utils.yaml
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -10,7 +10,7 @@ import salt.defaults.exitcodes
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -8,6 +8,11 @@ import pytest
docker = pytest.importorskip("docker")
pytestmark = [
pytest.mark.core_test,
]
def json_output_to_dict(output):
"""
Convert ``salt ... --out=json`` Syndic return to a dictionary. Since the

View file

@ -12,7 +12,9 @@ import salt.utils.files
import salt.utils.stringutils
from tests.support.runtests import RUNTIME_VARS
pytestmark = [pytest.mark.slow_test]
pytestmark = [
pytest.mark.slow_test,
]
@pytest.fixture

View file

@ -10,7 +10,7 @@ import pytest
from tests.support.helpers import PRE_PYTEST_SKIP_OR_NOT
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
]

View file

@ -7,6 +7,7 @@ from saltfactories.utils import random_string
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -10,7 +10,8 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.skip_on_spawning_platform(
reason="Deltaproxy minions do not currently work on spawning platforms.",
)
),
pytest.mark.slow_test,
]

View file

@ -8,6 +8,7 @@ import pytest
log = logging.getLogger(__name__)
@pytest.mark.core_test
def test_can_it_ping(salt_cli, salt_proxy):
"""
Ensure the proxy can ping
@ -16,6 +17,7 @@ def test_can_it_ping(salt_cli, salt_proxy):
assert ret.data is True
@pytest.mark.slow_test
def test_list_pkgs(salt_cli, salt_proxy):
"""
Package test 1, really just tests that the virtual function capability

View file

@ -6,7 +6,7 @@ import time
import pytest
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.skip_on_freebsd(reason="Processes are not properly killed on FreeBSD"),
]

View file

@ -9,7 +9,7 @@ log = logging.getLogger(__name__)
ECHO_STR = "The FitnessGram Pacer Test is a multistage aerobic capacity test"
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
]

View file

@ -3,7 +3,7 @@ import time
import pytest
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
]

View file

@ -17,7 +17,7 @@ from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.windows_whitelisted,
pytest.mark.skip_initial_onedir_failure,
pytest.mark.skip_if_binaries_missing(*KNOWN_BINARY_NAMES, check_all=False),

View file

@ -11,7 +11,7 @@ import salt.utils.platform
from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
pytestmark = [
pytest.mark.slow_test,
pytest.mark.core_test,
pytest.mark.skip_on_windows,
pytest.mark.skip_on_aix,
pytest.mark.skip_initial_onedir_failure,

View file

@ -7,6 +7,7 @@ from tests.support.mock import MagicMock, patch
pytestmark = [
pytest.mark.skip_if_binaries_missing("ssh", "ssh-keygen", check_all=True),
pytest.mark.slow_test,
]

View file

@ -5,7 +5,9 @@ import salt.daemons.masterapi as masterapi
import salt.utils.platform
from tests.support.mock import MagicMock, patch
pytestmark = [pytest.mark.slow_test]
pytestmark = [
pytest.mark.slow_test,
]
@pytest.fixture

View file

@ -5,7 +5,9 @@ import salt.daemons.masterapi as masterapi
import salt.utils.platform
from tests.support.mock import MagicMock, patch
pytestmark = [pytest.mark.slow_test]
pytestmark = [
pytest.mark.slow_test,
]
class FakeCache:

View file

@ -22,6 +22,7 @@ pytest.importorskip("gnupg")
pytestmark = [
pytest.mark.skip_unless_on_linux,
pytest.mark.requires_random_entropy,
pytest.mark.slow_test,
]
log = logging.getLogger(__name__)

View file

@ -18,6 +18,10 @@ from salt.utils.odict import OrderedDict
from tests.support.mock import MagicMock, patch
from tests.support.zfs import ZFSMockData
pytestmark = [
pytest.mark.slow_test,
]
@pytest.fixture
def utils_patch():

View file

@ -19,6 +19,10 @@ from salt.utils.odict import OrderedDict
from tests.support.mock import MagicMock, patch
from tests.support.zfs import ZFSMockData
pytestmark = [
pytest.mark.slow_test,
]
@pytest.fixture
def utils_patch():

View file

@ -23,6 +23,7 @@ log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -10,6 +10,7 @@ import salt.utils.win_reg as win_reg
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -16,6 +16,7 @@ from tests.support.mock import patch
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -13,6 +13,7 @@ import salt.utils.win_reg as win_reg
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -20,6 +20,7 @@ import salt.utils.win_reg as win_reg
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -9,6 +9,7 @@ import salt.modules.win_lgpo as win_lgpo
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -9,6 +9,7 @@ from tests.support.mock import MagicMock, Mock, patch
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -13,6 +13,7 @@ import salt.utils.win_reg as win_reg
pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.slow_test,
]

View file

@ -12,6 +12,7 @@ pytestmark = [
pytest.mark.windows_whitelisted,
pytest.mark.skip_unless_on_windows,
pytest.mark.destructive_test,
pytest.mark.slow_test,
]

View file

@ -8,6 +8,11 @@ import salt.state
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
@pytest.fixture
def minion_config(minion_opts):
minion_opts["file_client"] = "local"

View file

@ -15,6 +15,11 @@ import salt.utils.platform
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
@pytest.fixture
def root_dir(tmp_path):
return str(tmp_path / "root_dir")

View file

@ -17,6 +17,11 @@ from tests.support.mock import MagicMock, patch
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
def test_format_log_non_ascii_character():
"""
Tests running a non-ascii character through the state.format_log

View file

@ -15,6 +15,11 @@ from tests.support.mock import MagicMock, patch
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
@pytest.fixture
def state_obj(minion_opts):
with patch("salt.state.State._gather_pillar"):

View file

@ -13,6 +13,11 @@ from salt.utils.odict import OrderedDict
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
@pytest.fixture
def root_dir(tmp_path):
return tmp_path / "root_dir"

View file

@ -4,6 +4,10 @@ import pytest
import salt.state
pytestmark = [
pytest.mark.core_test,
]
@pytest.fixture
def master_opts(master_opts):

View file

@ -11,6 +11,11 @@ from salt.utils.decorators import state as statedecorators
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
def test_state_output_check_changes_is_dict():
"""
Test that changes key contains a dictionary.

View file

@ -11,6 +11,11 @@ from salt.utils.decorators import state as statedecorators
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.core_test,
]
def test_sub_state_output_check_changes_is_dict():
"""
Test that changes key contains a dictionary.

Some files were not shown because too many files have changed in this diff Show more