homelab: Ausfuehrer erkennt die App auch am neuen /usr/bin/update (SCRIPT_SLUG), das Community-Scripts nach jedem Update schreibt

Nach dem ersten echten Update (Gitea 1.27.2 -> 1.27.3) stand Gitea nur noch als "gitea" ohne App-Baustein da.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-09-24 19:29:55 +02:00
co-authored by Claude Opus 5.5
parent 528198de60
commit 4a2b1723f4
2 changed files with 22 additions and 4 deletions
+11
View File
@@ -348,3 +348,14 @@ def test_apps_mit_eigenem_updater_bekommen_keinen_knopf(daten, monkeypatch):
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"]
def test_ausfuehrer_erkennt_beide_formate_von_update():
"""Nach dem ersten echten Update (Gitea, 24.09.2026) schrieb das Community-Script /usr/bin/update neu."""
a = _ausfuehrer_modul()
alt = 'bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/adguard.sh)"'
neu = ('#!/usr/bin/env bash\nexport SCRIPT_SLUG="gitea"\nexport UPDATE_SCRIPT_NAME="gitea"\n'
'bash -c "$(curl -fsSL "${COMMUNITY_SCRIPTS_URL}/ct/${UPDATE_SCRIPT_NAME}.sh")"\n')
assert a.app_kennung_aus(alt) == "adguard"
assert a.app_kennung_aus(neu) == "gitea"
assert a.app_kennung_aus("") is None