Removed legacy code function

This commit is contained in:
Kevin Veen-Birkenbach 2025-07-13 18:02:44 +02:00
parent ad60f5fb37
commit 63bf7f7640
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
4 changed files with 12 additions and 13 deletions

View File

@ -1,11 +1,3 @@
from get_app_conf import get_app_conf
def is_feature_enabled(applications: dict, feature: str, application_id: str) -> bool:
"""
Wrapper for compatibility: Return True if applications[application_id].features[feature] is truthy.
"""
return bool(get_app_conf(applications, application_id, f"features.{feature}", strict=False))
def get_docker_compose(path_docker_compose_instances: str, application_id: str) -> dict:
"""
Build the docker_compose dict based on

5
tests/legacy/README.md Normal file
View File

@ -0,0 +1,5 @@
# Legacy Tests
This are tests which had been written for old code, but which had been modified to test restructured new code.
They shouldn't have high impacts on the stability of the system and propably could be deleted.

0
tests/legacy/__init__.py Normal file
View File

View File

@ -5,15 +5,17 @@ import os
sys.path.insert(
0,
os.path.abspath(
os.path.join(os.path.dirname(__file__), "../../../")
os.path.join(os.path.dirname(__file__), "../../")
),
)
from filter_plugins.configuration_filters import (
is_feature_enabled,
)
from filter_plugins.get_app_conf import AppConfigKeyError, get_app_conf
from filter_plugins.get_app_conf import AppConfigKeyError
def is_feature_enabled(applications: dict, feature: str, application_id: str) -> bool:
"""
Wrapper for compatibility: Return True if applications[application_id].features[feature] is truthy.
"""
return bool(get_app_conf(applications, application_id, f"features.{feature}", strict=False))
class TestConfigurationFilters(unittest.TestCase):