fix: roll out rotated traefik certificate secrets
This commit is contained in:
@@ -9,6 +9,7 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from types import SimpleNamespace
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
|
||||
@@ -115,6 +116,20 @@ def test_traefik_spec_is_stateless_with_setup():
|
||||
assert "setup" not in wr.SPECS["keycloak"]
|
||||
|
||||
|
||||
def test_traefik_certificate_rollout_detects_active_secret_version(monkeypatch):
|
||||
stack = "traefik_ci_commoninternet_net"
|
||||
monkeypatch.setattr(wr.lifecycle, "_stack_name", lambda _domain: stack)
|
||||
monkeypatch.setattr(
|
||||
wr,
|
||||
"_run",
|
||||
lambda *_args, **_kwargs: SimpleNamespace(
|
||||
stdout=f"{stack}_ssl_cert_vnew {stack}_ssl_key_vnew"
|
||||
),
|
||||
)
|
||||
assert not wr._traefik_requires_certificate_rollout("traefik.ci.commoninternet.net", "vnew")
|
||||
assert wr._traefik_requires_certificate_rollout("traefik.ci.commoninternet.net", "vold")
|
||||
|
||||
|
||||
def test_manual_migration_markers():
|
||||
assert wr.notes_flag_manual_migration("This release requires a MANUAL MIGRATION of the DB.")
|
||||
assert wr.notes_flag_manual_migration("Breaking change: action required before upgrade.")
|
||||
|
||||
Reference in New Issue
Block a user