Remove licensing repository dependency and standalone submodule proxy from tests and CI
CI Test Suite / Run Component Tests & Pipeline Verification (push) Failing after 1m35s

This commit is contained in:
2026-10-03 20:22:07 +02:00
parent d9bc8df002
commit 303744a3f8
5 changed files with 6 additions and 50 deletions
-1
View File
@@ -21,7 +21,6 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
submodules: recursive
- name: Verify Environment & Dependencies - name: Verify Environment & Dependencies
run: | run: |
+6 -3
View File
@@ -14,9 +14,12 @@ import shutil
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
ROOT_ASSETS_DIR = os.path.join(ROOT_DIR, "assets") ROOT_ASSETS_DIR = os.path.join(ROOT_DIR, "assets")
COMPILATION_ASSETS_DIR = os.path.join(ROOT_DIR, "compilation", "assets") COMPILATION_ASSETS_DIR = os.path.join(ROOT_DIR, "compilation", "assets")
LICENSING_ASSETS_DIR = os.path.join(ROOT_DIR, "LOGAR-LICENSING", "assets") target_asset_dirs = [ROOT_ASSETS_DIR, COMPILATION_ASSETS_DIR]
licensing_dir = os.path.join(ROOT_DIR, "LOGAR-LICENSING")
if os.path.exists(licensing_dir):
target_asset_dirs.append(os.path.join(licensing_dir, "assets"))
for d in (ROOT_ASSETS_DIR, COMPILATION_ASSETS_DIR, LICENSING_ASSETS_DIR): for d in target_asset_dirs:
os.makedirs(d, exist_ok=True) os.makedirs(d, exist_ok=True)
@@ -419,7 +422,7 @@ def main():
swatch_svgs[name] = f'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="16" height="16" rx="4" fill="{hex_code}" stroke="{border}" stroke-width="1.5"/></svg>' swatch_svgs[name] = f'<svg width="18" height="18" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="16" height="16" rx="4" fill="{hex_code}" stroke="{border}" stroke-width="1.5"/></svg>'
# 6. Write to target directories # 6. Write to target directories
for target_dir in (ROOT_ASSETS_DIR, COMPILATION_ASSETS_DIR, LICENSING_ASSETS_DIR): for target_dir in target_asset_dirs:
swatch_dir = os.path.join(target_dir, "swatches") swatch_dir = os.path.join(target_dir, "swatches")
os.makedirs(swatch_dir, exist_ok=True) os.makedirs(swatch_dir, exist_ok=True)
-1
View File
@@ -1 +0,0 @@
from src.hub.License_Authority import *
-34
View File
@@ -1,34 +0,0 @@
#!/usr/bin/env python3
"""
LOGAR Master License Authority Proxy
Delegates directly to the standalone submodule: LOGAR-LICENSING/License_Authority.py
Repo: https://gitea.eibl.tech/me0nline/LOGAR-LICENSING.git
"""
import os
import importlib.util
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
SUBMODULE_FILE = os.path.join(ROOT_DIR, "LOGAR-LICENSING", "License_Authority.py")
if not os.path.exists(SUBMODULE_FILE):
alt_sub = os.path.join(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")), "LOGAR-LICENSING", "License_Authority.py")
if os.path.exists(alt_sub):
SUBMODULE_FILE = alt_sub
if os.path.exists(SUBMODULE_FILE):
spec = importlib.util.spec_from_file_location("_submodule_authority", SUBMODULE_FILE)
if spec and spec.loader:
_sub = importlib.util.module_from_spec(spec)
spec.loader.exec_module(_sub)
# Export public symbols from submodule into this module's namespace
for attr in dir(_sub):
if not attr.startswith("__"):
globals()[attr] = getattr(_sub, attr)
else:
def main():
print("[!] LOGAR-LICENSING submodule not present in current workspace.")
return 0
if __name__ == "__main__":
if "main" in globals():
main()
-11
View File
@@ -11,7 +11,6 @@ from unittest.mock import MagicMock, patch
from src.hub import server_enrollment as enrollment from src.hub import server_enrollment as enrollment
from src.hub.pki_manager import PKIManager from src.hub.pki_manager import PKIManager
from src.hub import License_Authority
class TestHubEnrollmentPKIDeep(unittest.TestCase): class TestHubEnrollmentPKIDeep(unittest.TestCase):
@@ -96,16 +95,6 @@ class TestHubEnrollmentPKIDeep(unittest.TestCase):
self.assertEqual(lic_data["format"], "LOGAR_LICENSE_REQUEST") self.assertEqual(lic_data["format"], "LOGAR_LICENSE_REQUEST")
self.assertIn("csr", lic_data) self.assertIn("csr", lic_data)
def test_license_authority_cli_dispatch(self):
"""Tests License Authority helper and CLI options."""
try:
with patch("sys.argv", ["License_Authority.py", "--help"]):
ret = License_Authority.main()
if ret is not None:
self.assertEqual(ret, 0)
except SystemExit as cm:
self.assertEqual(cm.code, 0)
if __name__ == "__main__": if __name__ == "__main__":
unittest.main() unittest.main()