feat(hub): add fleet distribution policy controls and unblock update checks
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 2m1s

This commit is contained in:
2026-10-04 01:22:42 +02:00
parent 41563a8fb8
commit b069e1c1c0
4 changed files with 22 additions and 47 deletions
+4 -3
View File
@@ -323,11 +323,12 @@ class TestServerLicensingAndWebUI(unittest.TestCase):
conn.commit()
conn.close()
# WebUI should render locked banner and disabled upload controls
# WebUI should render update controls and community status
resp = Server.serve_webui()
html = resp.body.decode("utf-8")
self.assertIn("Fleet Auto-Update is Inactive & Locked", html)
self.assertIn("disabled", html)
self.assertIn("Fleet Distribution & Auto-Update Policy", html)
self.assertIn("COMMUNITY / UNRESTRICTED", html)
self.assertIn("autoUpdateEnabledRadio", html)
def test_json_lic_package_import(self):
"""Verifies importing an activated .lic JSON package via /api/license/import."""
+4 -4
View File
@@ -130,14 +130,14 @@ class TestUpdateSystem(unittest.TestCase):
f.write(b"WIN_CLIENT_V0360")
self.update_mgr.register_client_package("windows", dummy_pkg, version="0.3.6.0")
# 3. Client update check endpoint (Unlicensed should block auto_update)
chk_blocked = Server.check_client_update(
# 3. Client update check endpoint (Allowed regardless of license)
chk_unlicensed = Server.check_client_update(
client_id="win-client-01",
os="windows",
current_version="0.3.5.1"
)
self.assertFalse(chk_blocked["update_available"])
self.assertIn("not authorized", chk_blocked.get("reason", ""))
self.assertTrue(chk_unlicensed["update_available"])
self.assertEqual(chk_unlicensed["latest_version"], "0.3.6.0")
# 4. Enable auto_update feature flag in license config
import sqlite3