mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Added invokable paths for role categories
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
||||
import yaml
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
from filter_plugins.invokable_paths import get_invokable_paths
|
||||
|
||||
ROLES_DIR = Path(__file__).resolve().parent.parent.parent / "roles"
|
||||
|
||||
@@ -9,7 +10,7 @@ ROLES_DIR = Path(__file__).resolve().parent.parent.parent / "roles"
|
||||
class TestApplicationIdConsistency(unittest.TestCase):
|
||||
def test_application_id_matches_docker_prefix(self):
|
||||
failed_roles = []
|
||||
prefixes = ("web-app-", "web-svc-", "desk-", "util-", "drv-")
|
||||
prefixes = (get_invokable_paths(suffix="-"))
|
||||
|
||||
for role_path in ROLES_DIR.iterdir():
|
||||
if not role_path.is_dir():
|
||||
|
@@ -28,7 +28,8 @@ class TestCategoryPaths(unittest.TestCase):
|
||||
|
||||
# Nested subcategories (keys other than metadata)
|
||||
for sub_key in attrs:
|
||||
if sub_key in ('title', 'description', 'icon', 'children'):
|
||||
# Skip metadata keys
|
||||
if sub_key in ('title', 'description', 'icon', 'children', 'invokable'):
|
||||
continue
|
||||
expected.add(f"{top_key}-{sub_key}")
|
||||
|
||||
|
Reference in New Issue
Block a user