mirror of
https://github.com/d9pouces/id_configurator.git
synced 2026-11-09 01:47:21 +01:00
feat: add minimal testing workflow and enhance coverage requirements in tox configuration
Signed-off-by: d9pouces <github@19pouces.net>
This commit is contained in:
@@ -178,6 +178,16 @@ def test_import_key_raises_when_gpg_binary_missing(tmp_path, monkeypatch) -> Non
|
||||
YumModule().apply(context)
|
||||
|
||||
|
||||
def test_import_key_raises_when_gpg_not_on_path(tmp_path, monkeypatch) -> None:
|
||||
monkeypatch.setattr("id_configurator.modules.yum.shutil.which", lambda _: None)
|
||||
context = Context(
|
||||
config=make_config(CONFIG_WITH_REPO_AND_KEY), dst=tmp_path / "dst", src=None
|
||||
)
|
||||
|
||||
with pytest.raises(RuntimeError, match="gpg is not available"):
|
||||
YumModule().apply(context)
|
||||
|
||||
|
||||
def test_import_key_raises_on_invalid_key(tmp_path, monkeypatch) -> None:
|
||||
mock_run = MagicMock(
|
||||
return_value=subprocess.CompletedProcess(
|
||||
|
||||
Reference in New Issue
Block a user