Another big round of refactoring and cleaning...

This commit is contained in:
2025-07-11 17:55:26 +02:00
parent aa61bf2a44
commit 168c5c0da6
323 changed files with 761 additions and 811 deletions

View File

@@ -0,0 +1,25 @@
# tests/integration/test_no_application_id.py
import unittest
import yaml
import glob
import os
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
test_files = glob.glob(os.path.join(BASE_DIR, "roles/sys-*/vars/main.yml"))
class TestNoApplicationId(unittest.TestCase):
"""
Ensure that no sys-* role main.yml defines an application_id variable.
"""
def test_no_application_id_defined(self):
for file_path in test_files:
with open(file_path, 'r') as f:
content = yaml.safe_load(f) or {}
self.assertNotIn(
'application_id', content,
f"Unexpected 'application_id' defined in {file_path}"
)
if __name__ == '__main__':
unittest.main()

View File

@@ -8,7 +8,7 @@ import sys
def load_optimizer_module():
module_path = os.path.abspath(os.path.join(
os.path.dirname(__file__),
'..', "..", "..","..",'roles', 'cln-docker-storage-optimizer', 'files', 'cln-docker-storage-optimizer.py'
'..', "..", "..","..",'roles', 'sys-opt-ssd-hdd', 'files', 'sys-opt-ssd-hdd.py'
))
spec = importlib.util.spec_from_file_location('storage_optimizer', module_path)
optimizer = importlib.util.module_from_spec(spec)