From 7e23080cff0dfe0021e2f1ca224aa804c55ab5cc Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 28 Apr 2023 13:28:40 +0200 Subject: [PATCH] Refactor to C4kBuild --- src/main/python/ddadevops/__init__.py | 2 +- src/main/python/ddadevops/c4k_mixin.py | 4 +--- src/test/python/test_c4k_mixin.py | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/python/ddadevops/__init__.py b/src/main/python/ddadevops/__init__.py index fc4363f..f62b93d 100644 --- a/src/main/python/ddadevops/__init__.py +++ b/src/main/python/ddadevops/__init__.py @@ -9,7 +9,7 @@ from .provs_k3s_mixin import ProvsK3sMixin, add_provs_k3s_mixin_config from .aws_rds_pg_mixin import AwsRdsPgMixin, add_aws_rds_pg_mixin_config from .aws_mfa_mixin import AwsMfaMixin, add_aws_mfa_mixin_config from .aws_backend_properties_mixin import AwsBackendPropertiesMixin, add_aws_backend_properties_mixin_config -from .c4k_mixin import C4kMixin, add_c4k_mixin_config +from .c4k_mixin import C4kBuild, add_c4k_mixin_config from .exoscale_mixin import ExoscaleMixin, add_exoscale_mixin_config from .digitalocean_backend_properties_mixin import DigitaloceanBackendPropertiesMixin, add_digitalocean_backend_properties_mixin_config from .digitalocean_terraform_build import DigitaloceanTerraformBuild, create_digitalocean_terraform_build_config diff --git a/src/main/python/ddadevops/c4k_mixin.py b/src/main/python/ddadevops/c4k_mixin.py index 61edc8c..8a5f3f2 100644 --- a/src/main/python/ddadevops/c4k_mixin.py +++ b/src/main/python/ddadevops/c4k_mixin.py @@ -44,9 +44,7 @@ def add_c4k_mixin_config( ) return config - -#TODO: refactor this to C4kBuild -class C4kMixin(DevopsBuild): +class C4kBuild(DevopsBuild): def __init__(self, project, config): super().__init__(project, config) self.execution_api = ExecutionApi() diff --git a/src/test/python/test_c4k_mixin.py b/src/test/python/test_c4k_mixin.py index 59cf436..c4c2b17 100644 --- a/src/test/python/test_c4k_mixin.py +++ b/src/test/python/test_c4k_mixin.py @@ -1,9 +1,9 @@ import os from pybuilder.core import Project from src.main.python.ddadevops.domain import DnsRecord -from src.main.python.ddadevops.c4k_mixin import C4kMixin, add_c4k_mixin_config +from src.main.python.ddadevops.c4k_mixin import C4kBuild, add_c4k_mixin_config -class MyC4kMixin(C4kMixin): +class MyC4kBuild(C4kBuild): pass def test_c4k_mixin(tmp_path): @@ -29,7 +29,7 @@ def test_c4k_mixin(tmp_path): assert project_config.get('C4kMixin') is not None - mixin = MyC4kMixin(project, project_config) + mixin = MyC4kBuild(project, project_config) mixin.initialize_build_dir() assert mixin.build_path() == f'{tmp_path_str}/{build_dir}/{project_name}/{module_name}'