homelab: Update-Weg je App (Knopf nur, wo das Community-Script die App wirklich aktualisiert), Version von PVE Scripts Local aus der App selbst
Nachgelesen in ct/<app>.sh: AdGuard und PVE Scripts Local verweisen auf ihren eingebauten Updater, Gitea/NetBird/NPMplus aktualisieren wirklich, PBS ueber die Pakete. /root/.proxmoxve-local stand noch auf 0.5.8, die App selbst schon auf der neuesten Veroeffentlichung (v1.2.1, untagged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
56df849455
commit
528198de60
@@ -27,9 +27,10 @@ def daten(tmp_path, monkeypatch):
|
||||
# Keine Netzabfragen: neueste Versionen und Weboberflächen sind fest.
|
||||
neueste = {"AdguardTeam/AdGuardHome": "0.107.79", "go-gitea/gitea": "1.27.3", "netbirdio/netbird": "0.79.0",
|
||||
"community-scripts/ProxmoxVE-Local": "1.2.1"}
|
||||
roh = {"community-scripts/ProxmoxVE-Local": "untagged-80028680f0b29a379726"}
|
||||
monkeypatch.setattr(inventar, "neueste_version", lambda repo: {
|
||||
"tag": neueste.get(repo, "2026-07-24-r1"), "version": neueste.get(repo, "2026-07-24-r1"),
|
||||
"datum": "2026-07-24"})
|
||||
"tag": neueste.get(repo, "2026-07-24-r1"), "tag_roh": roh.get(repo, neueste.get(repo, "2026-07-24-r1")),
|
||||
"version": neueste.get(repo, "2026-07-24-r1"), "datum": "2026-07-24"})
|
||||
monkeypatch.setattr(inventar, "erreichbar", lambda url: True)
|
||||
monkeypatch.setattr(inventar.arcane, "app_version",
|
||||
lambda url: {"installiert": "2.12.0", "neu": "2.13.1", "update": True})
|
||||
@@ -106,7 +107,9 @@ def test_ziele_aus_dem_echten_bericht(daten):
|
||||
assert (pbs["os"]["zustand"], pbs["os"]["kurz"]) == ("neu", "58 Pakete")
|
||||
assert "Bind-Mount" in z["ct-105"]["rueckweg"]
|
||||
|
||||
assert {b["id"]: b for b in z["ct-103"]["bausteine"]}["app"]["kurz"] == "0.5.8 → 1.2.1"
|
||||
# PVE Scripts Local steht auf der neuesten (untagged) Veröffentlichung: aktuell, angezeigt als 1.2.1.
|
||||
pvesl = {b["id"]: b for b in z["ct-103"]["bausteine"]}["app"]
|
||||
assert (pvesl["zustand"], pvesl["installiert"], pvesl["aktion"]) == ("aktuell", "1.2.1", None)
|
||||
assert {b["id"]: b for b in z["ct-101"]["bausteine"]}["app"]["zustand"] == "aktuell" # Image jünger
|
||||
# NetBird hat keine Weboberfläche: erreichbar heißt hier „läuft“.
|
||||
assert z["ct-102"]["erreichbar"] is True
|
||||
@@ -334,3 +337,14 @@ def test_hinweise_des_homelab_waechters(daten, monkeypatch):
|
||||
encoding="utf-8")
|
||||
antwort = _client().get("/api/homelab/hinweise").json()
|
||||
assert [h["titel"] for h in antwort["hinweise"]] == ["Gitea antwortet nicht"]
|
||||
|
||||
|
||||
def test_apps_mit_eigenem_updater_bekommen_keinen_knopf(daten, monkeypatch):
|
||||
"""AdGuard und PVE Scripts Local aktualisiert das Community-Script nicht (ct/<app>.sh, 24.09.2026)."""
|
||||
bericht = json.loads(json.dumps(BERICHT))
|
||||
next(g for g in bericht["gaeste"] if g["vmid"] == 100)["app"]["version"] = "0.107.70"
|
||||
kanal.bericht_speichern(bericht)
|
||||
adguard = {b["id"]: b for b in {z["id"]: z for z in inventar.ziele()["ziele"]}["ct-100"]["bausteine"]}["app"]
|
||||
assert adguard["zustand"] == "neu" and adguard["aktion"] is None and "eigene Oberfläche" in adguard["grund"]
|
||||
antwort = updates.starten("ct-103", "app")
|
||||
assert antwort["ok"] is False and "Community-Script" in antwort["detail"]
|
||||
|
||||
Reference in New Issue
Block a user