fix(licensing): support bootstrap and activated JSON .lic imports, lock auto-update when unlicensed, and add upload confirmation warning
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 4m25s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 6m13s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Successful in 12m45s
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 4m25s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 6m13s
Build and Push LOGAR Runner / Build & Push Runner Image (push) Successful in 12m45s
This commit is contained in:
+17
-1
@@ -127,7 +127,23 @@ 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
|
||||
# 3. Client update check endpoint (Unlicensed should block auto_update)
|
||||
chk_blocked = 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", ""))
|
||||
|
||||
# 4. Enable auto_update feature flag in license config
|
||||
import sqlite3
|
||||
conn = sqlite3.connect(self.test_db)
|
||||
conn.execute("UPDATE license_config SET license_status = 'active', features = '[\"auto_update\"]' WHERE id = 1")
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
# 5. Client update check endpoint (Licensed)
|
||||
chk_resp = Server.check_client_update(
|
||||
client_id="win-client-01",
|
||||
os="windows",
|
||||
|
||||
Reference in New Issue
Block a user