mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-18 06:24:25 +02:00
Removed legacy code function
This commit is contained in:
parent
ad60f5fb37
commit
63bf7f7640
@ -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:
|
def get_docker_compose(path_docker_compose_instances: str, application_id: str) -> dict:
|
||||||
"""
|
"""
|
||||||
Build the docker_compose dict based on
|
Build the docker_compose dict based on
|
||||||
|
5
tests/legacy/README.md
Normal file
5
tests/legacy/README.md
Normal 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
0
tests/legacy/__init__.py
Normal file
@ -5,15 +5,17 @@ import os
|
|||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0,
|
0,
|
||||||
os.path.abspath(
|
os.path.abspath(
|
||||||
os.path.join(os.path.dirname(__file__), "../../../")
|
os.path.join(os.path.dirname(__file__), "../../")
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
from filter_plugins.configuration_filters import (
|
from filter_plugins.get_app_conf import AppConfigKeyError, get_app_conf
|
||||||
is_feature_enabled,
|
|
||||||
)
|
|
||||||
|
|
||||||
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):
|
class TestConfigurationFilters(unittest.TestCase):
|
Loading…
x
Reference in New Issue
Block a user