mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
additional test components.
This commit is contained in:
parent
5b606e8484
commit
0776274479
1 changed files with 9 additions and 0 deletions
|
@ -3806,18 +3806,22 @@ def test_pythonpath():
|
|||
"""
|
||||
test pythonpath
|
||||
"""
|
||||
python_path = sys.path
|
||||
|
||||
ret = core.pythonpath()
|
||||
assert "pythonpath" in ret
|
||||
assert ret["pythonpath"] == python_path
|
||||
|
||||
|
||||
def test_pythonversion():
|
||||
"""
|
||||
test pythonversion
|
||||
"""
|
||||
python_version = [*sys.version_info]
|
||||
|
||||
ret = core.pythonversion()
|
||||
assert "pythonversion" in ret
|
||||
assert ret["pythonversion"] == python_version
|
||||
|
||||
|
||||
def test_get_machine_id():
|
||||
|
@ -3887,6 +3891,11 @@ def test_id():
|
|||
ret = core.id_()
|
||||
assert "id" in ret
|
||||
|
||||
with patch("salt.grains.core.__opts__", {"id": "test_id_minion_id"}):
|
||||
ret = core.id_()
|
||||
assert "id" in ret
|
||||
assert ret["id"] == "test_id_minion_id"
|
||||
|
||||
|
||||
def test__linux_bin_exists():
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue