Hetzner-DNS-Token über eindeutigen Vaultalias auflösen #31
1 changed files with 7 additions and 0 deletions
|
|
@ -277,6 +277,13 @@ def test_dns_rrset_dry_run_returns_only_selected_records(monkeypatch):
|
||||||
assert body["deleted"] == []
|
assert body["deleted"] == []
|
||||||
|
|
||||||
|
|
||||||
|
def test_hetzner_dns_token_accepts_single_sanitized_vault_alias(monkeypatch):
|
||||||
|
monkeypatch.setattr(app, "_vault_cache", {"hetzner-dns-api": "secret-value", "other": "ignored"})
|
||||||
|
monkeypatch.setattr(app, "_read", lambda _name: None)
|
||||||
|
monkeypatch.setattr(app, "_ssh", lambda *_args, **_kwargs: (_ for _ in ()).throw(AssertionError("must not sync vault")))
|
||||||
|
assert app._get_hetzner_dns_token() == "secret-value"
|
||||||
|
|
||||||
|
|
||||||
def test_invalid_log_target_is_rejected_before_ssh():
|
def test_invalid_log_target_is_rejected_before_ssh():
|
||||||
with TestClient(app.app) as client:
|
with TestClient(app.app) as client:
|
||||||
response = client.get(
|
response = client.get(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue