mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Test Pytest
This commit is contained in:
parent
133993aa17
commit
e3165a586d
2 changed files with 12 additions and 0 deletions
1
changelog/62281.fixed
Normal file
1
changelog/62281.fixed
Normal file
|
@ -0,0 +1 @@
|
|||
Fix Salt Package Manager (SPM) exception when calling spm create_repo .
|
|
@ -163,6 +163,17 @@ def test_build_install(setup_spm, f1_content, patch_local_client):
|
|||
assert len(ui._error) == 0
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def test_repo_paths(setup_spm):
|
||||
_tmp_spm, ui, client, minion_config, minion_opts = setup_spm
|
||||
with patch("salt.client.Caller", MagicMock(return_value=minion_opts)):
|
||||
with patch(
|
||||
"salt.client.get_local_client", MagicMock(return_value=minion_opts["conf_file"])
|
||||
):
|
||||
client.run(["create_repo", "."])
|
||||
assert len(ui._status) == 1
|
||||
|
||||
|
||||
def test_failure_paths(setup_spm, patch_local_client):
|
||||
_tmp_spm, ui, client, minion_config, minion_opts = setup_spm
|
||||
fail_args = (
|
||||
|
|
Loading…
Add table
Reference in a new issue