mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -180,18 +180,6 @@ def test_kv_add_without_service_writes_the_generic_table(tmp_path: Path, monkeyp
|
||||
assert SQLite("check", dest).get_key(KID, "generic") == KEY
|
||||
|
||||
|
||||
@pytest.mark.parametrize("no_push", [False, True])
|
||||
def test_kv_add_without_vault_stops_when_no_configured_vault_takes_pushes(
|
||||
no_push: bool, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
) -> None:
|
||||
local_vaults(monkeypatch, no_push=tmp_path / "read_only.db" if no_push else None)
|
||||
|
||||
result = CliRunner().invoke(kv_module.kv, ["add", f"{KID}:{KEY}", "-s", "EXAMPLE"], standalone_mode=False)
|
||||
|
||||
assert isinstance(result.exception, click.ClickException)
|
||||
assert result.exception.message == "No Key Vaults without no_push are configured."
|
||||
|
||||
|
||||
@pytest.mark.parametrize("arg", [f"{KID}:{KEY[:-1]}", f"{KID}{KEY}", "missing.txt"])
|
||||
def test_kv_add_rejects_an_argument_that_is_neither_a_pair_nor_a_file(
|
||||
arg: str, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
|
||||
|
||||
Reference in New Issue
Block a user