mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Replace the @slowTest
decorator with the slow_test
pytest marker
This commit is contained in:
parent
727ae63d2c
commit
ae36b15f85
34 changed files with 110 additions and 214 deletions
|
@ -242,10 +242,14 @@ def pytest_configure(config):
|
||||||
config.addinivalue_line(
|
config.addinivalue_line(
|
||||||
"markers", "requires_sshd_server: Mark test that require an SSH server running"
|
"markers", "requires_sshd_server: Mark test that require an SSH server running"
|
||||||
)
|
)
|
||||||
|
config.addinivalue_line(
|
||||||
|
"markers",
|
||||||
|
"slow_test: Mark test as being slow. These tests are skipped by default unless `--run-slow` is passed",
|
||||||
|
)
|
||||||
# Make sure the test suite "knows" this is a pytest test run
|
# Make sure the test suite "knows" this is a pytest test run
|
||||||
RUNTIME_VARS.PYTEST_SESSION = True
|
RUNTIME_VARS.PYTEST_SESSION = True
|
||||||
|
|
||||||
# "Flag" the slotTest decorator if we're skipping slow tests or not
|
# "Flag" the slowTest decorator if we're skipping slow tests or not
|
||||||
os.environ["SLOW_TESTS"] = str(config.getoption("--run-slow"))
|
os.environ["SLOW_TESTS"] = str(config.getoption("--run-slow"))
|
||||||
|
|
||||||
|
|
||||||
|
@ -464,7 +468,9 @@ def pytest_runtest_setup(item):
|
||||||
item._skipped_by_mark = True
|
item._skipped_by_mark = True
|
||||||
pytest.skip(PRE_PYTEST_SKIP_REASON)
|
pytest.skip(PRE_PYTEST_SKIP_REASON)
|
||||||
|
|
||||||
if saltfactories.utils.compat.has_unittest_attr(item, "__slow_test__"):
|
if saltfactories.utils.compat.has_unittest_attr(
|
||||||
|
item, "__slow_test__"
|
||||||
|
) or item.get_closest_marker("slow_test"):
|
||||||
if item.config.getoption("--run-slow") is False:
|
if item.config.getoption("--run-slow") is False:
|
||||||
item._skipped_by_mark = True
|
item._skipped_by_mark = True
|
||||||
pytest.skip("Slow tests are disabled!")
|
pytest.skip("Slow tests are disabled!")
|
||||||
|
|
|
@ -8,7 +8,6 @@ import pytest
|
||||||
import salt.pillar
|
import salt.pillar
|
||||||
import salt.utils.stringutils
|
import salt.utils.stringutils
|
||||||
from saltfactories.utils.processes import ProcessResult
|
from saltfactories.utils.processes import ProcessResult
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
pytest.mark.windows_whitelisted,
|
pytest.mark.windows_whitelisted,
|
||||||
|
@ -271,7 +270,7 @@ def test_decrypt_pillar_default_renderer(salt_master, grains):
|
||||||
assert ret == GPG_PILLAR_DECRYPTED
|
assert ret == GPG_PILLAR_DECRYPTED
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_decrypt_pillar_alternate_delimiter(salt_master, grains):
|
def test_decrypt_pillar_alternate_delimiter(salt_master, grains):
|
||||||
"""
|
"""
|
||||||
Test recursive decryption of secrets:vault using a pipe instead of a
|
Test recursive decryption of secrets:vault using a pipe instead of a
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import pytest
|
import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
pytest.mark.windows_whitelisted,
|
pytest.mark.windows_whitelisted,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -76,7 +76,6 @@ def pillar_tree(base_env_pillar_tree_root_dir, salt_minion, salt_sub_minion, sal
|
||||||
assert ret.json[salt_sub_minion.id] is True
|
assert ret.json[salt_sub_minion.id] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list(salt_cli, salt_minion, salt_sub_minion):
|
def test_list(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt -L matcher
|
test salt -L matcher
|
||||||
|
@ -94,7 +93,6 @@ def test_list(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_min_with_grain(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_min_with_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt compound matcher
|
test salt compound matcher
|
||||||
|
@ -105,7 +103,6 @@ def test_compound_min_with_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_and_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_and_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="min* and not G@test_grain:foo")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="min* and not G@test_grain:foo")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -113,7 +110,6 @@ def test_compound_and_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="min* not G@test_grain:foo")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="min* not G@test_grain:foo")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -121,7 +117,6 @@ def test_compound_not_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_pcre_grain_and_grain(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_pcre_grain_and_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
match = "P@test_grain:^cheese$ and * and G@test_grain:cheese"
|
match = "P@test_grain:^cheese$ and * and G@test_grain:cheese"
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt=match)
|
ret = salt_cli.run("-C", "test.ping", minion_tgt=match)
|
||||||
|
@ -129,7 +124,6 @@ def test_compound_pcre_grain_and_grain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_list_and_pcre_minion(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_list_and_pcre_minion(salt_cli, salt_minion, salt_sub_minion):
|
||||||
match = "L@{} and E@.*".format(salt_sub_minion.id)
|
match = "L@{} and E@.*".format(salt_sub_minion.id)
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt=match)
|
ret = salt_cli.run("-C", "test.ping", minion_tgt=match)
|
||||||
|
@ -137,7 +131,6 @@ def test_compound_list_and_pcre_minion(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_minion.id not in ret.json
|
assert salt_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_not_sub_minion(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_not_sub_minion(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run(
|
ret = salt_cli.run(
|
||||||
"-C", "test.ping", minion_tgt="not {}".format(salt_sub_minion.id)
|
"-C", "test.ping", minion_tgt="not {}".format(salt_sub_minion.id)
|
||||||
|
@ -147,7 +140,6 @@ def test_compound_not_sub_minion(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_all_and_not_grains(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_all_and_not_grains(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run(
|
ret = salt_cli.run(
|
||||||
"-C", "test.ping", minion_tgt="* and ( not G@test_grain:cheese )"
|
"-C", "test.ping", minion_tgt="* and ( not G@test_grain:cheese )"
|
||||||
|
@ -157,7 +149,6 @@ def test_compound_all_and_not_grains(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
def test_compound_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="G%@planets%merc*")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="G%@planets%merc*")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -165,7 +156,6 @@ def test_compound_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_coumpound_pcre_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
def test_coumpound_pcre_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="P%@planets%^(mercury|saturn)$")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="P%@planets%^(mercury|saturn)$")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -173,7 +163,6 @@ def test_coumpound_pcre_grain_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
def test_compound_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
# FYI, This test was previously being skipped because it was unreliable
|
# FYI, This test was previously being skipped because it was unreliable
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="I%@companions%three%sarah*")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="I%@companions%three%sarah*")
|
||||||
|
@ -182,7 +171,6 @@ def test_compound_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_compound_pillar_pcre(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
def test_compound_pillar_pcre(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
# FYI, This test was previously being skipped because it was unreliable
|
# FYI, This test was previously being skipped because it was unreliable
|
||||||
ret = salt_cli.run("-C", "test.ping", minion_tgt="J%@knights%^(Lancelot|Galahad)$")
|
ret = salt_cli.run("-C", "test.ping", minion_tgt="J%@knights%^(Lancelot|Galahad)$")
|
||||||
|
@ -210,7 +198,6 @@ def test_compound_nodegroup(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_nodegroup(salt_cli, salt_minion, salt_sub_minion):
|
def test_nodegroup(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt nodegroup matcher
|
test salt nodegroup matcher
|
||||||
|
@ -242,7 +229,6 @@ def test_nodegroup(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_nodegroup_list(salt_cli, salt_minion, salt_sub_minion):
|
def test_nodegroup_list(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("-N", "test.ping", minion_tgt="list_group")
|
ret = salt_cli.run("-N", "test.ping", minion_tgt="list_group")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -265,7 +251,6 @@ def test_nodegroup_list(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_glob(salt_cli, salt_minion, salt_sub_minion):
|
def test_glob(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt glob matcher
|
test salt glob matcher
|
||||||
|
@ -281,7 +266,6 @@ def test_glob(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_regex(salt_cli, salt_minion, salt_sub_minion):
|
def test_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt regex matcher
|
test salt regex matcher
|
||||||
|
@ -296,7 +280,6 @@ def test_regex(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_grain(salt_cli, salt_master, salt_minion, salt_sub_minion):
|
def test_grain(salt_cli, salt_master, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt grain matcher
|
test salt grain matcher
|
||||||
|
@ -364,7 +347,6 @@ def test_grain(salt_cli, salt_master, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_regrain(salt_cli, salt_minion, salt_sub_minion):
|
def test_regrain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt grain matcher
|
test salt grain matcher
|
||||||
|
@ -379,7 +361,6 @@ def test_regrain(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_minion.id not in ret.json
|
assert salt_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
def test_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test pillar matcher
|
test pillar matcher
|
||||||
|
@ -413,7 +394,6 @@ def test_pillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_repillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
def test_repillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test salt pillar PCRE matcher
|
test salt pillar PCRE matcher
|
||||||
|
@ -430,7 +410,6 @@ def test_repillar(salt_cli, salt_minion, salt_sub_minion, pillar_tree):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_ipcidr(salt_cli, salt_minion, salt_sub_minion):
|
def test_ipcidr(salt_cli, salt_minion, salt_sub_minion):
|
||||||
ret = salt_cli.run("network.subnets", minion_tgt=salt_minion.id)
|
ret = salt_cli.run("network.subnets", minion_tgt=salt_minion.id)
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -445,7 +424,6 @@ def test_ipcidr(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_static(salt_cli, salt_minion, salt_sub_minion):
|
def test_static(salt_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt static call
|
test salt static call
|
||||||
|
@ -456,7 +434,6 @@ def test_static(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_minion.id in ret.stdout
|
assert salt_minion.id in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_documentation(salt_cli, salt_minion):
|
def test_salt_documentation(salt_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test to see if we're supporting --doc
|
Test to see if we're supporting --doc
|
||||||
|
@ -466,7 +443,6 @@ def test_salt_documentation(salt_cli, salt_minion):
|
||||||
assert "test.ping" in ret.json
|
assert "test.ping" in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_documentation_too_many_arguments(salt_cli, salt_minion):
|
def test_salt_documentation_too_many_arguments(salt_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test to see if passing additional arguments shows an error
|
Test to see if passing additional arguments shows an error
|
||||||
|
|
|
@ -16,14 +16,15 @@ import shutil
|
||||||
import pytest
|
import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
import salt.utils.path
|
import salt.utils.path
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_context_retcode_salt(salt_cli, salt_minion):
|
def test_context_retcode_salt(salt_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test that a nonzero retcode set in the context dunder will cause the
|
Test that a nonzero retcode set in the context dunder will cause the
|
||||||
|
@ -36,7 +37,6 @@ def test_context_retcode_salt(salt_cli, salt_minion):
|
||||||
assert ret.exitcode == salt.defaults.exitcodes.EX_GENERIC, ret
|
assert ret.exitcode == salt.defaults.exitcodes.EX_GENERIC, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_error(salt_cli, salt_minion):
|
def test_salt_error(salt_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test that we return the expected retcode when a minion function raises
|
Test that we return the expected retcode when a minion function raises
|
||||||
|
@ -86,7 +86,6 @@ def test_salt_error(salt_cli, salt_minion):
|
||||||
assert ret.exitcode == salt.defaults.exitcodes.EX_GENERIC, ret
|
assert ret.exitcode == salt.defaults.exitcodes.EX_GENERIC, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_missing_minion(salt_cli, salt_master, salt_minion):
|
def test_missing_minion(salt_cli, salt_master, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test that a minion which doesn't respond results in a nonzeo exit code
|
Test that a minion which doesn't respond results in a nonzeo exit code
|
||||||
|
@ -113,7 +112,6 @@ def test_missing_minion(salt_cli, salt_master, salt_minion):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_unknown_argument(salt_cli):
|
def test_exit_status_unknown_argument(salt_cli):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to salt CLI.
|
Ensure correct exit status when an unknown argument is passed to salt CLI.
|
||||||
|
@ -126,7 +124,6 @@ def test_exit_status_unknown_argument(salt_cli):
|
||||||
assert "no such option: --unknown-argument" in ret.stderr
|
assert "no such option: --unknown-argument" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_correct_usage(salt_cli, salt_minion):
|
def test_exit_status_correct_usage(salt_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when salt CLI starts correctly.
|
Ensure correct exit status when salt CLI starts correctly.
|
||||||
|
|
|
@ -9,11 +9,11 @@ import logging
|
||||||
import pytest
|
import pytest
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
import salt.utils.pycrypto
|
import salt.utils.pycrypto
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
pytest.mark.skip_if_not_root,
|
pytest.mark.skip_if_not_root,
|
||||||
pytest.mark.destructive_test,
|
pytest.mark.destructive_test,
|
||||||
pytest.mark.skip_on_windows,
|
pytest.mark.skip_on_windows,
|
||||||
|
@ -74,7 +74,6 @@ def saltadm_account(sminion, saltops_group):
|
||||||
sminion.functions.user.delete(USERB, remove=True)
|
sminion.functions.user.delete(USERB, remove=True)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pam_auth_valid_user(salt_minion, salt_cli, saltdev_account):
|
def test_pam_auth_valid_user(salt_minion, salt_cli, saltdev_account):
|
||||||
"""
|
"""
|
||||||
test that pam auth mechanism works with a valid user
|
test that pam auth mechanism works with a valid user
|
||||||
|
@ -94,7 +93,6 @@ def test_pam_auth_valid_user(salt_minion, salt_cli, saltdev_account):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pam_auth_invalid_user(salt_minion, salt_cli, saltdev_account):
|
def test_pam_auth_invalid_user(salt_minion, salt_cli, saltdev_account):
|
||||||
"""
|
"""
|
||||||
test pam auth mechanism errors for an invalid user
|
test pam auth mechanism errors for an invalid user
|
||||||
|
@ -112,7 +110,6 @@ def test_pam_auth_invalid_user(salt_minion, salt_cli, saltdev_account):
|
||||||
assert ret.stdout == "Authentication error occurred."
|
assert ret.stdout == "Authentication error occurred."
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pam_auth_valid_group(salt_minion, salt_cli, saltadm_account):
|
def test_pam_auth_valid_group(salt_minion, salt_cli, saltadm_account):
|
||||||
"""
|
"""
|
||||||
test that pam auth mechanism works for a valid group
|
test that pam auth mechanism works for a valid group
|
||||||
|
|
|
@ -19,21 +19,23 @@ import salt.utils.files
|
||||||
import salt.utils.json
|
import salt.utils.json
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
import salt.utils.yaml
|
import salt.utils.yaml
|
||||||
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON, slowTest
|
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_fib(salt_call_cli):
|
def test_fib(salt_call_cli):
|
||||||
ret = salt_call_cli.run("test.fib", "3")
|
ret = salt_call_cli.run("test.fib", "3")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
assert ret.json[0] == 2
|
assert ret.json[0] == 2
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_fib_txt_output(salt_call_cli):
|
def test_fib_txt_output(salt_call_cli):
|
||||||
ret = salt_call_cli.run("--output=txt", "test.fib", "3")
|
ret = salt_call_cli.run("--output=txt", "test.fib", "3")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
@ -44,7 +46,6 @@ def test_fib_txt_output(salt_call_cli):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.parametrize("indent", [-1, 0, 1])
|
@pytest.mark.parametrize("indent", [-1, 0, 1])
|
||||||
def test_json_out_indent(salt_call_cli, indent):
|
def test_json_out_indent(salt_call_cli, indent):
|
||||||
ret = salt_call_cli.run("--out=json", "--out-indent={}".format(indent), "test.ping")
|
ret = salt_call_cli.run("--out=json", "--out-indent={}".format(indent), "test.ping")
|
||||||
|
@ -60,7 +61,6 @@ def test_json_out_indent(salt_call_cli, indent):
|
||||||
assert ret.stdout == expected_output
|
assert ret.stdout == expected_output
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_local_sls_call(salt_call_cli):
|
def test_local_sls_call(salt_call_cli):
|
||||||
fileroot = os.path.join(RUNTIME_VARS.FILES, "file", "base")
|
fileroot = os.path.join(RUNTIME_VARS.FILES, "file", "base")
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
|
@ -73,7 +73,6 @@ def test_local_sls_call(salt_call_cli):
|
||||||
assert state_run_dict["changes"]["ret"] == "hello"
|
assert state_run_dict["changes"]["ret"] == "hello"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_local_salt_call(salt_call_cli):
|
def test_local_salt_call(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
This tests to make sure that salt-call does not execute the
|
This tests to make sure that salt-call does not execute the
|
||||||
|
@ -94,7 +93,6 @@ def test_local_salt_call(salt_call_cli):
|
||||||
assert contents.count("foo") == 1, contents
|
assert contents.count("foo") == 1, contents
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
||||||
def test_user_delete_kw_output(salt_call_cli):
|
def test_user_delete_kw_output(salt_call_cli):
|
||||||
ret = salt_call_cli.run("-d", "user.delete", _timeout=120)
|
ret = salt_call_cli.run("-d", "user.delete", _timeout=120)
|
||||||
|
@ -105,7 +103,6 @@ def test_user_delete_kw_output(salt_call_cli):
|
||||||
assert expected_output in ret.stdout
|
assert expected_output in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_documentation_too_many_arguments(salt_call_cli):
|
def test_salt_documentation_too_many_arguments(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test to see if passing additional arguments shows an error
|
Test to see if passing additional arguments shows an error
|
||||||
|
@ -115,7 +112,6 @@ def test_salt_documentation_too_many_arguments(salt_call_cli):
|
||||||
assert "You can only get documentation for one method at one time" in ret.stderr
|
assert "You can only get documentation for one method at one time" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_issue_6973_state_highstate_exit_code(salt_call_cli):
|
def test_issue_6973_state_highstate_exit_code(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
If there is no tops/master_tops or state file matches
|
If there is no tops/master_tops or state file matches
|
||||||
|
@ -134,7 +130,6 @@ def test_issue_6973_state_highstate_exit_code(salt_call_cli):
|
||||||
assert expected_comment in ret.stdout
|
assert expected_comment in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
def test_issue_15074_output_file_append(salt_call_cli):
|
def test_issue_15074_output_file_append(salt_call_cli):
|
||||||
|
|
||||||
|
@ -163,7 +158,6 @@ def test_issue_15074_output_file_append(salt_call_cli):
|
||||||
assert second_run_output == first_run_output + first_run_output
|
assert second_run_output == first_run_output + first_run_output
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
def test_issue_14979_output_file_permissions(salt_call_cli):
|
def test_issue_14979_output_file_permissions(salt_call_cli):
|
||||||
with pytest.helpers.temp_file(name="issue-14979") as output_file:
|
with pytest.helpers.temp_file(name="issue-14979") as output_file:
|
||||||
|
@ -202,7 +196,6 @@ def test_issue_14979_output_file_permissions(salt_call_cli):
|
||||||
assert stat1.st_mode != stat3.st_mode
|
assert stat1.st_mode != stat3.st_mode
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason="This test does not apply on Win")
|
@pytest.mark.skip_on_windows(reason="This test does not apply on Win")
|
||||||
def test_42116_cli_pillar_override(salt_call_cli):
|
def test_42116_cli_pillar_override(salt_call_cli):
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
|
@ -219,7 +212,6 @@ def test_42116_cli_pillar_override(salt_call_cli):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_items_masterless(
|
def test_pillar_items_masterless(
|
||||||
salt_minion, salt_call_cli, base_env_pillar_tree_root_dir
|
salt_minion, salt_call_cli, base_env_pillar_tree_root_dir
|
||||||
):
|
):
|
||||||
|
@ -260,7 +252,6 @@ def test_pillar_items_masterless(
|
||||||
assert ret.json["monty"] == "python"
|
assert ret.json["monty"] == "python"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_masterless_highstate(salt_call_cli):
|
def test_masterless_highstate(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
test state.highstate in masterless mode
|
test state.highstate in masterless mode
|
||||||
|
@ -273,7 +264,6 @@ def test_masterless_highstate(salt_call_cli):
|
||||||
assert state_run_dict["__id__"] == destpath
|
assert state_run_dict["__id__"] == destpath
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows
|
@pytest.mark.skip_on_windows
|
||||||
def test_syslog_file_not_found(salt_minion, salt_call_cli):
|
def test_syslog_file_not_found(salt_minion, salt_call_cli):
|
||||||
"""
|
"""
|
||||||
|
@ -305,7 +295,6 @@ def test_syslog_file_not_found(salt_minion, salt_call_cli):
|
||||||
os.chdir(old_cwd)
|
os.chdir(old_cwd)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
@pytest.mark.skip_on_windows
|
@pytest.mark.skip_on_windows
|
||||||
def test_return(salt_call_cli, salt_run_cli):
|
def test_return(salt_call_cli, salt_run_cli):
|
||||||
|
@ -328,7 +317,6 @@ def test_return(salt_call_cli, salt_run_cli):
|
||||||
assert ret.json[target] == "returnTOmaster"
|
assert ret.json[target] == "returnTOmaster"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_unknown_argument(salt_call_cli):
|
def test_exit_status_unknown_argument(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to salt CLI.
|
Ensure correct exit status when an unknown argument is passed to salt CLI.
|
||||||
|
@ -339,7 +327,6 @@ def test_exit_status_unknown_argument(salt_call_cli):
|
||||||
assert "no such option: --unknown-argument" in ret.stderr
|
assert "no such option: --unknown-argument" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_correct_usage(salt_call_cli):
|
def test_exit_status_correct_usage(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when salt CLI starts correctly.
|
Ensure correct exit status when salt CLI starts correctly.
|
||||||
|
@ -349,7 +336,6 @@ def test_exit_status_correct_usage(salt_call_cli):
|
||||||
assert ret.exitcode == salt.defaults.exitcodes.EX_OK, ret
|
assert ret.exitcode == salt.defaults.exitcodes.EX_OK, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_context_retcode_salt_call(salt_call_cli):
|
def test_context_retcode_salt_call(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test that a nonzero retcode set in the context dunder will cause the
|
Test that a nonzero retcode set in the context dunder will cause the
|
||||||
|
@ -381,7 +367,6 @@ def test_context_retcode_salt_call(salt_call_cli):
|
||||||
assert ret.exitcode == salt.defaults.exitcodes.EX_STATE_COMPILER_ERROR, ret
|
assert ret.exitcode == salt.defaults.exitcodes.EX_STATE_COMPILER_ERROR, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_call_error(salt_call_cli):
|
def test_salt_call_error(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test that we return the expected retcode when a minion function raises
|
Test that we return the expected retcode when a minion function raises
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
"""
|
"""
|
||||||
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
|
tests.integration.shell.cp
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
tests.integration.shell.cp
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,7 +10,6 @@ import pathlib
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import salt.utils.files
|
import salt.utils.files
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -35,7 +31,7 @@ def dest_testfile():
|
||||||
dst.unlink()
|
dst.unlink()
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
@pytest.mark.windows_whitelisted
|
@pytest.mark.windows_whitelisted
|
||||||
def test_cp_testfile(salt_minion, salt_cp_cli, source_testfile, dest_testfile):
|
def test_cp_testfile(salt_minion, salt_cp_cli, source_testfile, dest_testfile):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -9,9 +9,11 @@ import salt.utils.platform
|
||||||
import salt.utils.pycrypto
|
import salt.utils.pycrypto
|
||||||
import salt.utils.yaml
|
import salt.utils.yaml
|
||||||
from saltfactories.utils import random_string
|
from saltfactories.utils import random_string
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
USERA = "saltdev-key"
|
USERA = "saltdev-key"
|
||||||
USERA_PWD = "saltdev"
|
USERA_PWD = "saltdev"
|
||||||
|
@ -47,7 +49,6 @@ def saltdev_account(sminion):
|
||||||
sminion.functions.user.delete(USERA, remove=True)
|
sminion.functions.user.delete(USERA, remove=True)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_remove_key(salt_master, salt_key_cli):
|
def test_remove_key(salt_master, salt_key_cli):
|
||||||
"""
|
"""
|
||||||
test salt-key -d usage
|
test salt-key -d usage
|
||||||
|
@ -90,7 +91,6 @@ def test_remove_key(salt_master, salt_key_cli):
|
||||||
os.unlink(key)
|
os.unlink(key)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.destructive_test
|
@pytest.mark.destructive_test
|
||||||
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
||||||
|
@ -146,7 +146,6 @@ def test_remove_key_eauth(salt_key_cli, salt_master, saltdev_account):
|
||||||
os.unlink(key)
|
os.unlink(key)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.parametrize("key_type", ("acc", "pre", "den", "un", "rej"))
|
@pytest.mark.parametrize("key_type", ("acc", "pre", "den", "un", "rej"))
|
||||||
def test_list_accepted_args(salt_key_cli, key_type):
|
def test_list_accepted_args(salt_key_cli, key_type):
|
||||||
"""
|
"""
|
||||||
|
@ -162,7 +161,6 @@ def test_list_accepted_args(salt_key_cli, key_type):
|
||||||
assert "error:" in ret.stderr
|
assert "error:" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_all(salt_key_cli, salt_minion, salt_sub_minion):
|
def test_list_all(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt-key -L
|
test salt-key -L
|
||||||
|
@ -178,7 +176,6 @@ def test_list_all(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
assert ret.json == expected
|
assert ret.json == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_all_yaml_out(salt_key_cli, salt_minion, salt_sub_minion):
|
def test_list_all_yaml_out(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt-key -L --out=yaml
|
test salt-key -L --out=yaml
|
||||||
|
@ -195,7 +192,6 @@ def test_list_all_yaml_out(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
assert output == expected
|
assert output == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_all_raw_out(salt_key_cli, salt_minion, salt_sub_minion):
|
def test_list_all_raw_out(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt-key -L --out=raw
|
test salt-key -L --out=raw
|
||||||
|
@ -212,7 +208,6 @@ def test_list_all_raw_out(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
assert output == expected
|
assert output == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_acc(salt_key_cli, salt_minion, salt_sub_minion):
|
def test_list_acc(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
test salt-key -l acc
|
test salt-key -l acc
|
||||||
|
@ -223,7 +218,6 @@ def test_list_acc(salt_key_cli, salt_minion, salt_sub_minion):
|
||||||
assert ret.json == expected
|
assert ret.json == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.destructive_test
|
@pytest.mark.destructive_test
|
||||||
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
||||||
|
@ -239,7 +233,6 @@ def test_list_acc_eauth(salt_key_cli, saltdev_account, salt_minion, salt_sub_min
|
||||||
assert ret.json == expected
|
assert ret.json == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.destructive_test
|
@pytest.mark.destructive_test
|
||||||
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
||||||
|
@ -263,7 +256,6 @@ def test_list_acc_eauth_bad_creds(salt_key_cli, saltdev_account):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_acc_wrong_eauth(salt_key_cli):
|
def test_list_acc_wrong_eauth(salt_key_cli):
|
||||||
"""
|
"""
|
||||||
test salt-key -l with wrong eauth
|
test salt-key -l with wrong eauth
|
||||||
|
@ -285,7 +277,6 @@ def test_list_acc_wrong_eauth(salt_key_cli):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_list_un(salt_key_cli):
|
def test_list_un(salt_key_cli):
|
||||||
"""
|
"""
|
||||||
test salt-key -l un
|
test salt-key -l un
|
||||||
|
@ -296,7 +287,6 @@ def test_list_un(salt_key_cli):
|
||||||
assert ret.json == expected
|
assert ret.json == expected
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_keys_generation(salt_key_cli):
|
def test_keys_generation(salt_key_cli):
|
||||||
with pytest.helpers.temp_directory() as tempdir:
|
with pytest.helpers.temp_directory() as tempdir:
|
||||||
ret = salt_key_cli.run("--gen-keys", "minibar", "--gen-keys-dir", tempdir)
|
ret = salt_key_cli.run("--gen-keys", "minibar", "--gen-keys-dir", tempdir)
|
||||||
|
@ -310,7 +300,6 @@ def test_keys_generation(salt_key_cli):
|
||||||
os.chmod(os.path.join(tempdir, filename), 0o700)
|
os.chmod(os.path.join(tempdir, filename), 0o700)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_keys_generation_keysize_min(salt_key_cli):
|
def test_keys_generation_keysize_min(salt_key_cli):
|
||||||
with pytest.helpers.temp_directory() as tempdir:
|
with pytest.helpers.temp_directory() as tempdir:
|
||||||
ret = salt_key_cli.run(
|
ret = salt_key_cli.run(
|
||||||
|
@ -320,7 +309,6 @@ def test_keys_generation_keysize_min(salt_key_cli):
|
||||||
assert "error: The minimum value for keysize is 2048" in ret.stderr
|
assert "error: The minimum value for keysize is 2048" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_keys_generation_keysize_max(salt_key_cli):
|
def test_keys_generation_keysize_max(salt_key_cli):
|
||||||
with pytest.helpers.temp_directory() as tempdir:
|
with pytest.helpers.temp_directory() as tempdir:
|
||||||
ret = salt_key_cli.run(
|
ret = salt_key_cli.run(
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
"""
|
"""
|
||||||
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
|
tests.integration.shell.master
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
tests.integration.shell.master
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,19 +11,21 @@ import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
from saltfactories.exceptions import FactoryNotStarted
|
from saltfactories.exceptions import FactoryNotStarted
|
||||||
from saltfactories.utils import random_string
|
from saltfactories.utils import random_string
|
||||||
from tests.support.helpers import PRE_PYTEST_SKIP_REASON, slowTest
|
from tests.support.helpers import PRE_PYTEST_SKIP_REASON
|
||||||
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def master_id():
|
def master_id():
|
||||||
return random_string("master-")
|
return random_string("master-")
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
||||||
def test_exit_status_unknown_user(salt_factories, master_id):
|
def test_exit_status_unknown_user(salt_factories, master_id):
|
||||||
"""
|
"""
|
||||||
|
@ -44,7 +43,6 @@ def test_exit_status_unknown_user(salt_factories, master_id):
|
||||||
assert "The user is not available." in exc.value.stderr, exc.value
|
assert "The user is not available." in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_unknown_argument(salt_factories, master_id):
|
def test_exit_status_unknown_argument(salt_factories, master_id):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to salt-master.
|
Ensure correct exit status when an unknown argument is passed to salt-master.
|
||||||
|
@ -57,7 +55,6 @@ def test_exit_status_unknown_argument(salt_factories, master_id):
|
||||||
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
||||||
def test_exit_status_correct_usage(salt_factories, master_id):
|
def test_exit_status_correct_usage(salt_factories, master_id):
|
||||||
factory = salt_factories.get_salt_master_daemon(master_id)
|
factory = salt_factories.get_salt_master_daemon(master_id)
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
"""
|
"""
|
||||||
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
|
tests.integration.shell.minion
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
tests.integration.shell.minion
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,12 +12,15 @@ import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
from saltfactories.exceptions import FactoryNotStarted
|
from saltfactories.exceptions import FactoryNotStarted
|
||||||
from saltfactories.utils import random_string
|
from saltfactories.utils import random_string
|
||||||
from tests.support.helpers import PRE_PYTEST_SKIP_REASON, slowTest
|
from tests.support.helpers import PRE_PYTEST_SKIP_REASON
|
||||||
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def minion_id(salt_factories, salt_master):
|
def minion_id(salt_factories, salt_master):
|
||||||
|
@ -38,7 +38,6 @@ def minion_id(salt_factories, salt_master):
|
||||||
os.unlink(minion_key_file)
|
os.unlink(minion_key_file)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
||||||
def test_exit_status_unknown_user(salt_master, minion_id):
|
def test_exit_status_unknown_user(salt_master, minion_id):
|
||||||
"""
|
"""
|
||||||
|
@ -54,7 +53,6 @@ def test_exit_status_unknown_user(salt_master, minion_id):
|
||||||
assert "The user is not available." in exc.value.stderr, exc.value
|
assert "The user is not available." in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_unknown_argument(salt_master, minion_id):
|
def test_exit_status_unknown_argument(salt_master, minion_id):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to salt-minion.
|
Ensure correct exit status when an unknown argument is passed to salt-minion.
|
||||||
|
@ -68,7 +66,6 @@ def test_exit_status_unknown_argument(salt_master, minion_id):
|
||||||
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
||||||
def test_exit_status_correct_usage(salt_master, minion_id):
|
def test_exit_status_correct_usage(salt_master, minion_id):
|
||||||
factory = salt_master.get_salt_minion_daemon(
|
factory = salt_master.get_salt_minion_daemon(
|
||||||
|
|
|
@ -14,7 +14,7 @@ import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
from saltfactories.exceptions import FactoryNotStarted
|
from saltfactories.exceptions import FactoryNotStarted
|
||||||
from saltfactories.utils import random_string
|
from saltfactories.utils import random_string
|
||||||
from tests.support.helpers import PRE_PYTEST_SKIP_REASON, slowTest
|
from tests.support.helpers import PRE_PYTEST_SKIP_REASON
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ def proxy_minion_id(salt_factories, salt_master):
|
||||||
pytest.helpers.remove_stale_minion_key(salt_master, _proxy_minion_id)
|
pytest.helpers.remove_stale_minion_key(salt_master, _proxy_minion_id)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_exit_status_no_proxyid(salt_master, proxy_minion_id):
|
def test_exit_status_no_proxyid(salt_master, proxy_minion_id):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when --proxyid argument is missing.
|
Ensure correct exit status when --proxyid argument is missing.
|
||||||
|
@ -62,7 +62,7 @@ def test_exit_status_unknown_user(salt_master, proxy_minion_id):
|
||||||
assert "The user is not available." in exc.value.stderr, exc.value
|
assert "The user is not available." in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_exit_status_unknown_argument(salt_master, proxy_minion_id):
|
def test_exit_status_unknown_argument(salt_master, proxy_minion_id):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to
|
Ensure correct exit status when an unknown argument is passed to
|
||||||
|
|
|
@ -10,13 +10,15 @@ import salt.utils.files
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
import salt.utils.pycrypto
|
import salt.utils.pycrypto
|
||||||
import salt.utils.yaml
|
import salt.utils.yaml
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
USERA = "saltdev-runner"
|
USERA = "saltdev-runner"
|
||||||
USERA_PWD = "saltdev"
|
USERA_PWD = "saltdev"
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
def saltdev_account(sminion):
|
def saltdev_account(sminion):
|
||||||
|
@ -43,7 +45,6 @@ def salt_run_cli(salt_master):
|
||||||
return salt_master.get_salt_run_cli(default_timeout=120)
|
return salt_master.get_salt_run_cli(default_timeout=120)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_in_docs(salt_run_cli):
|
def test_in_docs(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
test the salt-run docs system
|
test the salt-run docs system
|
||||||
|
@ -58,7 +59,6 @@ def test_in_docs(salt_run_cli):
|
||||||
assert "network.wollist:" in ret.stdout
|
assert "network.wollist:" in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_not_in_docs(salt_run_cli):
|
def test_not_in_docs(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
test the salt-run docs system
|
test the salt-run docs system
|
||||||
|
@ -67,7 +67,6 @@ def test_not_in_docs(salt_run_cli):
|
||||||
assert "jobs.SaltException:" not in ret.stdout
|
assert "jobs.SaltException:" not in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_documentation_too_many_arguments(salt_run_cli):
|
def test_salt_documentation_too_many_arguments(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
Test to see if passing additional arguments shows an error
|
Test to see if passing additional arguments shows an error
|
||||||
|
@ -77,7 +76,6 @@ def test_salt_documentation_too_many_arguments(salt_run_cli):
|
||||||
assert "You can only get documentation for one method at one time" in ret.stderr
|
assert "You can only get documentation for one method at one time" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_unknown_argument(salt_run_cli):
|
def test_exit_status_unknown_argument(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when an unknown argument is passed to salt-run.
|
Ensure correct exit status when an unknown argument is passed to salt-run.
|
||||||
|
@ -88,7 +86,6 @@ def test_exit_status_unknown_argument(salt_run_cli):
|
||||||
assert "no such option: --unknown-argument" in ret.stderr
|
assert "no such option: --unknown-argument" in ret.stderr
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_exit_status_correct_usage(salt_run_cli):
|
def test_exit_status_correct_usage(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
Ensure correct exit status when salt-run starts correctly.
|
Ensure correct exit status when salt-run starts correctly.
|
||||||
|
@ -97,7 +94,6 @@ def test_exit_status_correct_usage(salt_run_cli):
|
||||||
assert ret.exitcode == salt.defaults.exitcodes.EX_OK, ret
|
assert ret.exitcode == salt.defaults.exitcodes.EX_OK, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.parametrize("flag", ["--auth", "--eauth", "--external-auth", "-a"])
|
@pytest.mark.parametrize("flag", ["--auth", "--eauth", "--external-auth", "-a"])
|
||||||
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
||||||
|
@ -124,7 +120,6 @@ def test_salt_run_with_eauth_all_args(salt_run_cli, saltdev_account, flag):
|
||||||
assert ret.json == expected, ret
|
assert ret.json == expected, ret
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
@pytest.mark.skip_on_windows(reason="PAM is not supported on Windows")
|
||||||
def test_salt_run_with_eauth_bad_passwd(salt_run_cli, saltdev_account):
|
def test_salt_run_with_eauth_bad_passwd(salt_run_cli, saltdev_account):
|
||||||
|
@ -148,7 +143,6 @@ def test_salt_run_with_eauth_bad_passwd(salt_run_cli, saltdev_account):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_salt_run_with_wrong_eauth(salt_run_cli):
|
def test_salt_run_with_wrong_eauth(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
test salt-run with wrong eauth parameter
|
test salt-run with wrong eauth parameter
|
||||||
|
|
|
@ -14,12 +14,15 @@ import pytest
|
||||||
import salt.defaults.exitcodes
|
import salt.defaults.exitcodes
|
||||||
from saltfactories.exceptions import FactoryNotStarted
|
from saltfactories.exceptions import FactoryNotStarted
|
||||||
from saltfactories.utils import random_string
|
from saltfactories.utils import random_string
|
||||||
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON, slowTest
|
from tests.support.helpers import PRE_PYTEST_SKIP, PRE_PYTEST_SKIP_REASON
|
||||||
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
pytest.mark.windows_whitelisted,
|
||||||
|
]
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = pytest.mark.windows_whitelisted
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def syndic_id(salt_factories, salt_master):
|
def syndic_id(salt_factories, salt_master):
|
||||||
|
@ -37,7 +40,6 @@ def syndic_id(salt_factories, salt_master):
|
||||||
os.unlink(syndic_key_file)
|
os.unlink(syndic_key_file)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
@pytest.mark.skip_on_windows(reason="Windows does not do user checks")
|
||||||
def test_exit_status_unknown_user(salt_master, syndic_id):
|
def test_exit_status_unknown_user(salt_master, syndic_id):
|
||||||
|
@ -55,7 +57,6 @@ def test_exit_status_unknown_user(salt_master, syndic_id):
|
||||||
assert "The user is not available." in exc.value.stderr, exc.value
|
assert "The user is not available." in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
def test_exit_status_unknown_argument(salt_master, syndic_id):
|
def test_exit_status_unknown_argument(salt_master, syndic_id):
|
||||||
"""
|
"""
|
||||||
|
@ -71,7 +72,6 @@ def test_exit_status_unknown_argument(salt_master, syndic_id):
|
||||||
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
assert "no such option: --unknown-argument" in exc.value.stderr, exc.value
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
@PRE_PYTEST_SKIP
|
@PRE_PYTEST_SKIP
|
||||||
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
@pytest.mark.skip_on_windows(reason=PRE_PYTEST_SKIP_REASON)
|
||||||
def test_exit_status_correct_usage(salt_master, syndic_id):
|
def test_exit_status_correct_usage(salt_master, syndic_id):
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [pytest.mark.windows_whitelisted]
|
pytestmark = [pytest.mark.windows_whitelisted]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sync_grains(salt_call_cli):
|
def test_sync_grains(salt_call_cli):
|
||||||
ret = salt_call_cli.run("saltutil.sync_grains")
|
ret = salt_call_cli.run("saltutil.sync_grains")
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
|
|
@ -4,7 +4,6 @@ Integration tests for the saltutil module.
|
||||||
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [pytest.mark.windows_whitelisted]
|
pytestmark = [pytest.mark.windows_whitelisted]
|
||||||
|
|
||||||
|
@ -25,7 +24,7 @@ def refresh_pillar(salt_call_cli, salt_minion, salt_sub_minion):
|
||||||
assert ret.json
|
assert ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sync_all(salt_call_cli):
|
def test_sync_all(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test syncing all ModuleCase
|
Test syncing all ModuleCase
|
||||||
|
@ -63,7 +62,7 @@ def test_sync_all(salt_call_cli):
|
||||||
assert ret.json == expected_return
|
assert ret.json == expected_return
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sync_all_whitelist(salt_call_cli):
|
def test_sync_all_whitelist(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test syncing all ModuleCase with whitelist
|
Test syncing all ModuleCase with whitelist
|
||||||
|
@ -95,7 +94,7 @@ def test_sync_all_whitelist(salt_call_cli):
|
||||||
assert ret.json == expected_return
|
assert ret.json == expected_return
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sync_all_blacklist(salt_call_cli):
|
def test_sync_all_blacklist(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test syncing all ModuleCase with blacklist
|
Test syncing all ModuleCase with blacklist
|
||||||
|
@ -139,7 +138,7 @@ def test_sync_all_blacklist(salt_call_cli):
|
||||||
assert ret.json == expected_return
|
assert ret.json == expected_return
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sync_all_blacklist_and_whitelist(salt_call_cli):
|
def test_sync_all_blacklist_and_whitelist(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Test syncing all ModuleCase with whitelist and blacklist
|
Test syncing all ModuleCase with whitelist and blacklist
|
||||||
|
|
|
@ -8,7 +8,6 @@ import time
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import salt.defaults.events
|
import salt.defaults.events
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -33,7 +32,7 @@ def event_listener(salt_factories):
|
||||||
return salt_factories.event_listener
|
return salt_factories.event_listener
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
@pytest.mark.parametrize("sync_refresh", [False, True])
|
@pytest.mark.parametrize("sync_refresh", [False, True])
|
||||||
def test_pillar_refresh(
|
def test_pillar_refresh(
|
||||||
salt_minion,
|
salt_minion,
|
||||||
|
|
|
@ -7,7 +7,6 @@ import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [pytest.mark.windows_whitelisted]
|
pytestmark = [pytest.mark.windows_whitelisted]
|
||||||
|
|
||||||
|
@ -39,7 +38,7 @@ def refresh_pillar(salt_cli, salt_minion, salt_sub_minion):
|
||||||
assert ret.json[salt_sub_minion.id] is True
|
assert ret.json[salt_sub_minion.id] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_wheel_just_function(salt_call_cli, salt_minion, salt_sub_minion):
|
def test_wheel_just_function(salt_call_cli, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
Tests using the saltutil.wheel function when passing only a function.
|
Tests using the saltutil.wheel function when passing only a function.
|
||||||
|
@ -51,7 +50,7 @@ def test_wheel_just_function(salt_call_cli, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json["return"]
|
assert salt_sub_minion.id in ret.json["return"]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_wheel_with_arg(salt_call_cli):
|
def test_wheel_with_arg(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Tests using the saltutil.wheel function when passing a function and an arg.
|
Tests using the saltutil.wheel function when passing a function and an arg.
|
||||||
|
@ -61,7 +60,7 @@ def test_wheel_with_arg(salt_call_cli):
|
||||||
assert ret.json["return"] == {}
|
assert ret.json["return"] == {}
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_wheel_no_arg_raise_error(salt_call_cli):
|
def test_wheel_no_arg_raise_error(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Tests using the saltutil.wheel function when passing a function that requires
|
Tests using the saltutil.wheel function when passing a function that requires
|
||||||
|
@ -71,7 +70,7 @@ def test_wheel_no_arg_raise_error(salt_call_cli):
|
||||||
assert ret.exitcode == 0
|
assert ret.exitcode == 0
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_wheel_with_kwarg(salt_call_cli):
|
def test_wheel_with_kwarg(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Tests using the saltutil.wheel function when passing a function and a kwarg.
|
Tests using the saltutil.wheel function when passing a function and a kwarg.
|
||||||
|
|
|
@ -3,11 +3,10 @@ Tests for the file state
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
import salt.states.file
|
import salt.states.file
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("verify_ssl", [True, False])
|
@pytest.mark.parametrize("verify_ssl", [True, False])
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_get_source_sum_verify_ssl_false(
|
def test_get_source_sum_verify_ssl_false(
|
||||||
salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
||||||
):
|
):
|
||||||
|
@ -34,7 +33,7 @@ def test_get_source_sum_verify_ssl_false(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("verify_ssl", [True, False])
|
@pytest.mark.parametrize("verify_ssl", [True, False])
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_get_managed_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
def test_get_managed_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
||||||
"""
|
"""
|
||||||
test verify_ssl with get_managed
|
test verify_ssl with get_managed
|
||||||
|
@ -65,7 +64,7 @@ def test_get_managed_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("verify_ssl", [True, False])
|
@pytest.mark.parametrize("verify_ssl", [True, False])
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_manage_file_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
def test_manage_file_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
||||||
"""
|
"""
|
||||||
test verify_ssl with manage_file
|
test verify_ssl with manage_file
|
||||||
|
@ -95,7 +94,7 @@ def test_manage_file_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("verify_ssl", [True, False])
|
@pytest.mark.parametrize("verify_ssl", [True, False])
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_check_managed_changes_verify_ssl(
|
def test_check_managed_changes_verify_ssl(
|
||||||
salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
salt_call_cli, tmpdir, ssl_webserver, verify_ssl
|
||||||
):
|
):
|
||||||
|
@ -129,7 +128,7 @@ def test_check_managed_changes_verify_ssl(
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("verify_ssl", [True, False])
|
@pytest.mark.parametrize("verify_ssl", [True, False])
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_check_file_meta_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
def test_check_file_meta_verify_ssl(salt_call_cli, tmpdir, ssl_webserver, verify_ssl):
|
||||||
"""
|
"""
|
||||||
test verify_ssl with check_file_meta
|
test verify_ssl with check_file_meta
|
||||||
|
|
|
@ -3,9 +3,9 @@ import textwrap
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
pytest.mark.windows_whitelisted,
|
pytest.mark.windows_whitelisted,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ def pillar_tree(base_env_pillar_tree_root_dir, salt_minion, salt_call_cli):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_data(salt_call_cli, pillar_tree):
|
def test_data(salt_call_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
pillar.data
|
pillar.data
|
||||||
|
@ -74,7 +73,6 @@ def test_data(salt_call_cli, pillar_tree):
|
||||||
assert pillar["class"] == "other"
|
assert pillar["class"] == "other"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_issue_5449_report_actual_file_roots_in_pillar(
|
def test_issue_5449_report_actual_file_roots_in_pillar(
|
||||||
salt_call_cli, pillar_tree, base_env_state_tree_root_dir
|
salt_call_cli, pillar_tree, base_env_state_tree_root_dir
|
||||||
):
|
):
|
||||||
|
@ -93,7 +91,6 @@ def test_issue_5449_report_actual_file_roots_in_pillar(
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_ext_cmd_yaml(salt_call_cli, pillar_tree):
|
def test_ext_cmd_yaml(salt_call_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
pillar.data for ext_pillar cmd.yaml
|
pillar.data for ext_pillar cmd.yaml
|
||||||
|
@ -105,7 +102,6 @@ def test_ext_cmd_yaml(salt_call_cli, pillar_tree):
|
||||||
assert pillar["ext_spam"] == "eggs"
|
assert pillar["ext_spam"] == "eggs"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_issue_5951_actual_file_roots_in_opts(
|
def test_issue_5951_actual_file_roots_in_opts(
|
||||||
salt_call_cli, pillar_tree, base_env_state_tree_root_dir
|
salt_call_cli, pillar_tree, base_env_state_tree_root_dir
|
||||||
):
|
):
|
||||||
|
@ -119,7 +115,6 @@ def test_issue_5951_actual_file_roots_in_opts(
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_items(salt_call_cli, pillar_tree):
|
def test_pillar_items(salt_call_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
Test to ensure we get expected output
|
Test to ensure we get expected output
|
||||||
|
@ -135,7 +130,6 @@ def test_pillar_items(salt_call_cli, pillar_tree):
|
||||||
assert pillar_items["knights"] == ["Lancelot", "Galahad", "Bedevere", "Robin"]
|
assert pillar_items["knights"] == ["Lancelot", "Galahad", "Bedevere", "Robin"]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_command_line(salt_call_cli, pillar_tree):
|
def test_pillar_command_line(salt_call_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
Test to ensure when using pillar override
|
Test to ensure when using pillar override
|
||||||
|
@ -209,7 +203,6 @@ def key_pillar(salt_minion, salt_cli, base_env_pillar_tree_root_dir):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_refresh_pillar_raw(salt_cli, salt_minion, key_pillar):
|
def test_pillar_refresh_pillar_raw(salt_cli, salt_minion, key_pillar):
|
||||||
"""
|
"""
|
||||||
Validate the minion's pillar.raw call behavior for new pillars
|
Validate the minion's pillar.raw call behavior for new pillars
|
||||||
|
@ -239,7 +232,6 @@ def test_pillar_refresh_pillar_raw(salt_cli, salt_minion, key_pillar):
|
||||||
assert val is True, repr(val)
|
assert val is True, repr(val)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_refresh_pillar_get(salt_cli, salt_minion, key_pillar):
|
def test_pillar_refresh_pillar_get(salt_cli, salt_minion, key_pillar):
|
||||||
"""
|
"""
|
||||||
Validate the minion's pillar.get call behavior for new pillars
|
Validate the minion's pillar.get call behavior for new pillars
|
||||||
|
@ -270,7 +262,6 @@ def test_pillar_refresh_pillar_get(salt_cli, salt_minion, key_pillar):
|
||||||
assert val is True, repr(val)
|
assert val is True, repr(val)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_refresh_pillar_item(salt_cli, salt_minion, key_pillar):
|
def test_pillar_refresh_pillar_item(salt_cli, salt_minion, key_pillar):
|
||||||
"""
|
"""
|
||||||
Validate the minion's pillar.item call behavior for new pillars
|
Validate the minion's pillar.item call behavior for new pillars
|
||||||
|
@ -304,7 +295,6 @@ def test_pillar_refresh_pillar_item(salt_cli, salt_minion, key_pillar):
|
||||||
assert val[key] is True
|
assert val[key] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_refresh_pillar_items(salt_cli, salt_minion, key_pillar):
|
def test_pillar_refresh_pillar_items(salt_cli, salt_minion, key_pillar):
|
||||||
"""
|
"""
|
||||||
Validate the minion's pillar.item call behavior for new pillars
|
Validate the minion's pillar.item call behavior for new pillars
|
||||||
|
@ -327,7 +317,6 @@ def test_pillar_refresh_pillar_items(salt_cli, salt_minion, key_pillar):
|
||||||
assert val[key] is True
|
assert val[key] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_refresh_pillar_ping(salt_cli, salt_minion, key_pillar):
|
def test_pillar_refresh_pillar_ping(salt_cli, salt_minion, key_pillar):
|
||||||
"""
|
"""
|
||||||
Validate the minion's test.ping does not update pillars
|
Validate the minion's test.ping does not update pillars
|
||||||
|
|
|
@ -10,7 +10,6 @@ import subprocess
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
GPG_TEST_PRIV_KEY = """-----BEGIN PGP PRIVATE KEY BLOCK-----
|
GPG_TEST_PRIV_KEY = """-----BEGIN PGP PRIVATE KEY BLOCK-----
|
||||||
|
@ -334,7 +333,7 @@ def gpg_agent(request, gpghome):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_make_repo(grains, gpghome, repodir, gpg_agent, salt_call_cli, pillar_tree):
|
def test_make_repo(grains, gpghome, repodir, gpg_agent, salt_call_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test make repo, signing rpm
|
test make repo, signing rpm
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from tests.support.helpers import slowTest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_valid_docs(salt_call_cli):
|
def test_valid_docs(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Make sure no functions are exposed that don't have valid docstrings
|
Make sure no functions are exposed that don't have valid docstrings
|
||||||
|
|
|
@ -7,7 +7,7 @@ from xml.etree import ElementTree
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from saltfactories.utils import cli_scripts
|
from saltfactories.utils import cli_scripts
|
||||||
from tests.support.helpers import skip_if_binaries_missing, slowTest
|
from tests.support.helpers import skip_if_binaries_missing
|
||||||
from tests.support.virt import SaltVirtMinionContainerFactory
|
from tests.support.virt import SaltVirtMinionContainerFactory
|
||||||
|
|
||||||
docker = pytest.importorskip("docker")
|
docker = pytest.importorskip("docker")
|
||||||
|
@ -158,7 +158,7 @@ def salt_cli(salt_master, virt_minion_0, virt_minion_1):
|
||||||
|
|
||||||
|
|
||||||
@skip_if_binaries_missing("docker")
|
@skip_if_binaries_missing("docker")
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
class TestVirtTest:
|
class TestVirtTest:
|
||||||
"""
|
"""
|
||||||
Test virt routines
|
Test virt routines
|
||||||
|
@ -415,7 +415,7 @@ def prep_virt(salt_cli, virt_minion_0, virt_minion_1, virt_domain):
|
||||||
|
|
||||||
|
|
||||||
@skip_if_binaries_missing("docker")
|
@skip_if_binaries_missing("docker")
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
class TestVirtMigrateTest:
|
class TestVirtMigrateTest:
|
||||||
def test_define_xml_path(self, salt_cli, virt_minion_0, virt_domain):
|
def test_define_xml_path(self, salt_cli, virt_minion_0, virt_domain):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -13,7 +13,6 @@ import pytest
|
||||||
import salt.proxy.dummy
|
import salt.proxy.dummy
|
||||||
import salt.utils.path
|
import salt.utils.path
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -31,7 +30,7 @@ def salt_call_cli(salt_proxy):
|
||||||
return salt_proxy.get_salt_call_cli(default_timeout=120)
|
return salt_proxy.get_salt_call_cli(default_timeout=120)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_can_it_ping(salt_call_cli):
|
def test_can_it_ping(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Ensure the proxy can ping
|
Ensure the proxy can ping
|
||||||
|
@ -41,7 +40,7 @@ def test_can_it_ping(salt_call_cli):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_list_pkgs(salt_call_cli):
|
def test_list_pkgs(salt_call_cli):
|
||||||
"""
|
"""
|
||||||
Package test 1, really just tests that the virtual function capability
|
Package test 1, really just tests that the virtual function capability
|
||||||
|
@ -53,7 +52,7 @@ def test_list_pkgs(salt_call_cli):
|
||||||
assert package_name in ret.json
|
assert package_name in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_upgrade(salt_call_cli):
|
def test_upgrade(salt_call_cli):
|
||||||
ret = salt_call_cli.run("pkg.upgrade")
|
ret = salt_call_cli.run("pkg.upgrade")
|
||||||
assert ret.exitcode == 0, ret
|
assert ret.exitcode == 0, ret
|
||||||
|
@ -68,14 +67,14 @@ def service_name():
|
||||||
return random.choice(list(salt.proxy.dummy._initial_state()["services"]))
|
return random.choice(list(salt.proxy.dummy._initial_state()["services"]))
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_service_list(salt_call_cli, service_name):
|
def test_service_list(salt_call_cli, service_name):
|
||||||
ret = salt_call_cli.run("service.list")
|
ret = salt_call_cli.run("service.list")
|
||||||
assert ret.exitcode == 0, ret
|
assert ret.exitcode == 0, ret
|
||||||
assert service_name in ret.json
|
assert service_name in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_service_start(salt_call_cli):
|
def test_service_start(salt_call_cli):
|
||||||
ret = salt_call_cli.run("service.start", "samba")
|
ret = salt_call_cli.run("service.start", "samba")
|
||||||
assert ret.exitcode == 0, ret
|
assert ret.exitcode == 0, ret
|
||||||
|
@ -84,14 +83,14 @@ def test_service_start(salt_call_cli):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_service_get_all(salt_call_cli, service_name):
|
def test_service_get_all(salt_call_cli, service_name):
|
||||||
ret = salt_call_cli.run("service.get_all")
|
ret = salt_call_cli.run("service.get_all")
|
||||||
assert ret.exitcode == 0, ret
|
assert ret.exitcode == 0, ret
|
||||||
assert service_name in ret.json
|
assert service_name in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_grains_items(salt_call_cli):
|
def test_grains_items(salt_call_cli):
|
||||||
ret = salt_call_cli.run("grains.items")
|
ret = salt_call_cli.run("grains.items")
|
||||||
assert ret.exitcode == 0, ret
|
assert ret.exitcode == 0, ret
|
||||||
|
|
|
@ -4,7 +4,6 @@ Simple Smoke Tests for Connected Proxy Minion
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
|
@ -95,7 +94,7 @@ def test_state_apply(salt_cli, salt_proxy):
|
||||||
assert value["result"] is True
|
assert value["result"] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_state_highstate(salt_cli, salt_proxy):
|
def test_state_highstate(salt_cli, salt_proxy):
|
||||||
ret = salt_cli.run("state.highstate", minion_tgt=salt_proxy.id)
|
ret = salt_cli.run("state.highstate", minion_tgt=salt_proxy.id)
|
||||||
for value in ret.json.values():
|
for value in ret.json.values():
|
||||||
|
|
|
@ -5,7 +5,10 @@ Tests for the salt-run command
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
|
]
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -49,7 +52,6 @@ def pillar_tree(base_env_pillar_tree_root_dir, salt_minion, salt_sub_minion, sal
|
||||||
assert ret.json[salt_sub_minion.id] is True
|
assert ret.json[salt_sub_minion.id] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_cache(salt_run_cli):
|
def test_cache(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
Store, list, fetch, then flush data
|
Store, list, fetch, then flush data
|
||||||
|
@ -81,7 +83,6 @@ def test_cache(salt_run_cli):
|
||||||
assert "test_cache" not in ret.json
|
assert "test_cache" not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_cache_invalid(salt_run_cli):
|
def test_cache_invalid(salt_run_cli):
|
||||||
"""
|
"""
|
||||||
Store, list, fetch, then flush data
|
Store, list, fetch, then flush data
|
||||||
|
@ -92,7 +93,6 @@ def test_cache_invalid(salt_run_cli):
|
||||||
assert "Passed invalid arguments:" in ret.stdout
|
assert "Passed invalid arguments:" in ret.stdout
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_grains(salt_run_cli, pillar_tree, salt_minion):
|
def test_grains(salt_run_cli, pillar_tree, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test cache.grains
|
Test cache.grains
|
||||||
|
@ -102,7 +102,6 @@ def test_grains(salt_run_cli, pillar_tree, salt_minion):
|
||||||
assert salt_minion.id in ret.json
|
assert salt_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
def test_pillar(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
Test cache.pillar
|
Test cache.pillar
|
||||||
|
@ -113,7 +112,6 @@ def test_pillar(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_no_tgt(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
def test_pillar_no_tgt(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
Test cache.pillar when no tgt is
|
Test cache.pillar when no tgt is
|
||||||
|
@ -126,7 +124,6 @@ def test_pillar_no_tgt(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_minion_noexist(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
def test_pillar_minion_noexist(salt_run_cli, pillar_tree, salt_minion, salt_sub_minion):
|
||||||
"""
|
"""
|
||||||
Test cache.pillar when the target does not exist
|
Test cache.pillar when the target does not exist
|
||||||
|
@ -137,7 +134,6 @@ def test_pillar_minion_noexist(salt_run_cli, pillar_tree, salt_minion, salt_sub_
|
||||||
assert salt_sub_minion.id not in ret.json
|
assert salt_sub_minion.id not in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_pillar_minion_tgt_type_pillar(
|
def test_pillar_minion_tgt_type_pillar(
|
||||||
salt_run_cli, pillar_tree, salt_minion, salt_sub_minion
|
salt_run_cli, pillar_tree, salt_minion, salt_sub_minion
|
||||||
):
|
):
|
||||||
|
@ -151,7 +147,6 @@ def test_pillar_minion_tgt_type_pillar(
|
||||||
assert salt_sub_minion.id in ret.json
|
assert salt_sub_minion.id in ret.json
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_mine(salt_run_cli, salt_minion):
|
def test_mine(salt_run_cli, salt_minion):
|
||||||
"""
|
"""
|
||||||
Test cache.mine
|
Test cache.mine
|
||||||
|
|
|
@ -5,7 +5,6 @@ Integration tests for the etcd modules
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -80,7 +79,7 @@ def pillar_tree(base_env_pillar_tree_root_dir, salt_minion):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sdb(salt_call_cli):
|
def test_sdb(salt_call_cli):
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbetcd/secret/test/test_sdb/foo", value="bar"
|
"sdb.set", uri="sdb://sdbetcd/secret/test/test_sdb/foo", value="bar"
|
||||||
|
@ -95,7 +94,7 @@ def test_sdb(salt_call_cli):
|
||||||
assert ret.json == "bar"
|
assert ret.json == "bar"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sdb_runner(salt_run_cli):
|
def test_sdb_runner(salt_run_cli):
|
||||||
ret = salt_run_cli.run(
|
ret = salt_run_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbetcd/secret/test/test_sdb_runner/foo", value="bar"
|
"sdb.set", uri="sdb://sdbetcd/secret/test/test_sdb_runner/foo", value="bar"
|
||||||
|
@ -110,7 +109,7 @@ def test_sdb_runner(salt_run_cli):
|
||||||
assert ret.stdout == "bar"
|
assert ret.stdout == "bar"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_config(salt_call_cli, pillar_tree):
|
def test_config(salt_call_cli, pillar_tree):
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbetcd/secret/test/test_pillar_sdb/foo", value="bar"
|
"sdb.set", uri="sdb://sdbetcd/secret/test/test_pillar_sdb/foo", value="bar"
|
||||||
|
|
|
@ -10,7 +10,6 @@ import time
|
||||||
import pytest
|
import pytest
|
||||||
import salt.utils.path
|
import salt.utils.path
|
||||||
from saltfactories.utils.processes import ProcessResult
|
from saltfactories.utils.processes import ProcessResult
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
@ -186,7 +185,7 @@ def vault_container_version(request, salt_call_cli, vault_port):
|
||||||
assert state_run["result"] is True
|
assert state_run["result"] is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sdb(salt_call_cli):
|
def test_sdb(salt_call_cli):
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbvault/secret/test/test_sdb/foo", value="bar"
|
"sdb.set", uri="sdb://sdbvault/secret/test/test_sdb/foo", value="bar"
|
||||||
|
@ -199,7 +198,7 @@ def test_sdb(salt_call_cli):
|
||||||
assert ret.json == "bar"
|
assert ret.json == "bar"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sdb_runner(salt_run_cli):
|
def test_sdb_runner(salt_run_cli):
|
||||||
ret = salt_run_cli.run(
|
ret = salt_run_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbvault/secret/test/test_sdb_runner/foo", value="bar"
|
"sdb.set", uri="sdb://sdbvault/secret/test/test_sdb_runner/foo", value="bar"
|
||||||
|
@ -214,7 +213,7 @@ def test_sdb_runner(salt_run_cli):
|
||||||
assert ret.stdout == "bar"
|
assert ret.stdout == "bar"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_config(salt_call_cli, pillar_tree):
|
def test_config(salt_call_cli, pillar_tree):
|
||||||
ret = salt_call_cli.run(
|
ret = salt_call_cli.run(
|
||||||
"sdb.set", uri="sdb://sdbvault/secret/test/test_pillar_sdb/foo", value="bar"
|
"sdb.set", uri="sdb://sdbvault/secret/test/test_pillar_sdb/foo", value="bar"
|
||||||
|
@ -227,7 +226,7 @@ def test_config(salt_call_cli, pillar_tree):
|
||||||
assert ret.json == "bar"
|
assert ret.json == "bar"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_sdb_kv2_kvv2_path_local(salt_call_cli, vault_container_version):
|
def test_sdb_kv2_kvv2_path_local(salt_call_cli, vault_container_version):
|
||||||
if vault_container_version != "1.3.1":
|
if vault_container_version != "1.3.1":
|
||||||
pytest.skip("Test not applicable to vault {}".format(vault_container_version))
|
pytest.skip("Test not applicable to vault {}".format(vault_container_version))
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
pytest.mark.skip_on_windows(reason="salt-ssh not available on Windows"),
|
pytest.mark.skip_on_windows(reason="salt-ssh not available on Windows"),
|
||||||
|
@ -34,7 +33,7 @@ def pillar_tree(base_env_pillar_tree_root_dir):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_pillar_items(salt_ssh_cli, pillar_tree):
|
def test_pillar_items(salt_ssh_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test pillar.items with salt-ssh
|
test pillar.items with salt-ssh
|
||||||
|
@ -49,7 +48,7 @@ def test_pillar_items(salt_ssh_cli, pillar_tree):
|
||||||
assert pillar_items["knights"] == ["Lancelot", "Galahad", "Bedevere", "Robin"]
|
assert pillar_items["knights"] == ["Lancelot", "Galahad", "Bedevere", "Robin"]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_pillar_get(salt_ssh_cli, pillar_tree):
|
def test_pillar_get(salt_ssh_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test pillar.get with salt-ssh
|
test pillar.get with salt-ssh
|
||||||
|
@ -60,7 +59,7 @@ def test_pillar_get(salt_ssh_cli, pillar_tree):
|
||||||
assert ret.json == "python"
|
assert ret.json == "python"
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_pillar_get_doesnotexist(salt_ssh_cli, pillar_tree):
|
def test_pillar_get_doesnotexist(salt_ssh_cli, pillar_tree):
|
||||||
"""
|
"""
|
||||||
test pillar.get when pillar does not exist with salt-ssh
|
test pillar.get when pillar does not exist with salt-ssh
|
||||||
|
|
|
@ -7,7 +7,6 @@ import subprocess
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -24,7 +23,7 @@ def cron_account():
|
||||||
subprocess.run(command, check=False)
|
subprocess.run(command, check=False)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
@pytest.mark.skip_on_windows
|
@pytest.mark.skip_on_windows
|
||||||
@pytest.mark.skip_if_not_root
|
@pytest.mark.skip_if_not_root
|
||||||
@pytest.mark.skip_if_binaries_missing("crontab")
|
@pytest.mark.skip_if_binaries_missing("crontab")
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
Tests for the file state
|
Tests for the file state
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module")
|
@pytest.fixture(scope="module")
|
||||||
|
@ -42,7 +41,7 @@ def pillar_tree(base_env_pillar_tree_root_dir, salt_minion, salt_call_cli):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_verify_ssl_skip_verify_false(salt_call_cli, tmpdir, ssl_webserver):
|
def test_verify_ssl_skip_verify_false(salt_call_cli, tmpdir, ssl_webserver):
|
||||||
"""
|
"""
|
||||||
test verify_ssl when its False and True when managing
|
test verify_ssl when its False and True when managing
|
||||||
|
|
|
@ -6,7 +6,6 @@ Tests for minion blackout
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -15,7 +14,7 @@ pytestmark = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_blackout(salt_cli, blackout, salt_minion_1):
|
def test_blackout(salt_cli, blackout, salt_minion_1):
|
||||||
"""
|
"""
|
||||||
Test that basic minion blackout functionality works
|
Test that basic minion blackout functionality works
|
||||||
|
@ -32,7 +31,7 @@ def test_blackout(salt_cli, blackout, salt_minion_1):
|
||||||
assert ret.json is True
|
assert ret.json is True
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_blackout_whitelist(salt_cli, blackout, salt_minion_1):
|
def test_blackout_whitelist(salt_cli, blackout, salt_minion_1):
|
||||||
"""
|
"""
|
||||||
Test that minion blackout whitelist works
|
Test that minion blackout whitelist works
|
||||||
|
@ -56,7 +55,7 @@ def test_blackout_whitelist(salt_cli, blackout, salt_minion_1):
|
||||||
assert ret.json[0] == 13
|
assert ret.json[0] == 13
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_blackout_nonwhitelist(salt_cli, blackout, salt_minion_1):
|
def test_blackout_nonwhitelist(salt_cli, blackout, salt_minion_1):
|
||||||
"""
|
"""
|
||||||
Test that minion refuses to run non-whitelisted functions during
|
Test that minion refuses to run non-whitelisted functions during
|
||||||
|
|
|
@ -5,7 +5,6 @@ import time
|
||||||
import pytest
|
import pytest
|
||||||
import salt.config
|
import salt.config
|
||||||
import salt.version
|
import salt.version
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import pyinotify # pylint: disable=unused-import
|
import pyinotify # pylint: disable=unused-import
|
||||||
|
@ -86,7 +85,7 @@ def setup_beacons(mm_master_1_salt_cli, salt_mm_minion_1, inotify_test_path):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
@pytest.mark.slow_test
|
||||||
def test_beacons_duplicate_53344(
|
def test_beacons_duplicate_53344(
|
||||||
event_listener,
|
event_listener,
|
||||||
inotify_test_path,
|
inotify_test_path,
|
||||||
|
|
|
@ -12,18 +12,17 @@ import salt.utils.path
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
import salt.version
|
import salt.version
|
||||||
from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
pytest.mark.windows_whitelisted,
|
pytest.mark.windows_whitelisted,
|
||||||
pytest.mark.skip_if_binaries_missing(*KNOWN_BINARY_NAMES, check_all=False),
|
pytest.mark.skip_if_binaries_missing(*KNOWN_BINARY_NAMES, check_all=False),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_wheel(virtualenv, cache_dir):
|
def test_wheel(virtualenv, cache_dir):
|
||||||
"""
|
"""
|
||||||
test building and installing a bdist_wheel package
|
test building and installing a bdist_wheel package
|
||||||
|
@ -92,7 +91,6 @@ def test_wheel(virtualenv, cache_dir):
|
||||||
assert salt_generated_version_file_path.is_file()
|
assert salt_generated_version_file_path.is_file()
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_egg(virtualenv, cache_dir):
|
def test_egg(virtualenv, cache_dir):
|
||||||
"""
|
"""
|
||||||
test building and installing a bdist_egg package
|
test building and installing a bdist_egg package
|
||||||
|
@ -194,7 +192,6 @@ def test_egg(virtualenv, cache_dir):
|
||||||
and sys.version_info < (3, 6),
|
and sys.version_info < (3, 6),
|
||||||
reason="Skip on python 3.5",
|
reason="Skip on python 3.5",
|
||||||
)
|
)
|
||||||
@slowTest
|
|
||||||
def test_sdist(virtualenv, cache_dir):
|
def test_sdist(virtualenv, cache_dir):
|
||||||
"""
|
"""
|
||||||
test building and installing a sdist package
|
test building and installing a sdist package
|
||||||
|
@ -282,7 +279,6 @@ def test_sdist(virtualenv, cache_dir):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_setup_install(virtualenv, cache_dir):
|
def test_setup_install(virtualenv, cache_dir):
|
||||||
"""
|
"""
|
||||||
test installing directly from source
|
test installing directly from source
|
||||||
|
|
|
@ -8,17 +8,16 @@ import pprint
|
||||||
import pytest
|
import pytest
|
||||||
import salt.utils.platform
|
import salt.utils.platform
|
||||||
from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES
|
||||||
from tests.support.helpers import slowTest
|
|
||||||
from tests.support.runtests import RUNTIME_VARS
|
from tests.support.runtests import RUNTIME_VARS
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
|
pytest.mark.slow_test,
|
||||||
pytest.mark.skip_on_windows,
|
pytest.mark.skip_on_windows,
|
||||||
pytest.mark.skip_on_aix,
|
pytest.mark.skip_on_aix,
|
||||||
pytest.mark.skip_if_binaries_missing(*KNOWN_BINARY_NAMES, check_all=False),
|
pytest.mark.skip_if_binaries_missing(*KNOWN_BINARY_NAMES, check_all=False),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@slowTest
|
|
||||||
def test_man_pages(virtualenv):
|
def test_man_pages(virtualenv):
|
||||||
"""
|
"""
|
||||||
Make sure that man pages are installed
|
Make sure that man pages are installed
|
||||||
|
|
Loading…
Add table
Reference in a new issue