fix test_devops_build
This commit is contained in:
parent
2add0a76a2
commit
f4f27ed88a
2 changed files with 7 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
|||
from src.main.python.ddadevops.domain import DevopsFactory, Devops
|
||||
|
||||
|
||||
def build_devops(overrides: dict) -> Devops:
|
||||
def devops_config(overrides: dict) -> dict:
|
||||
default = {
|
||||
"build_type": "IMAGE",
|
||||
"stage": "test",
|
||||
|
@ -14,4 +13,7 @@ def build_devops(overrides: dict) -> Devops:
|
|||
}
|
||||
input = default.copy()
|
||||
input.update(overrides)
|
||||
return DevopsFactory().build_devops(input)
|
||||
return input
|
||||
|
||||
def build_devops(overrides: dict) -> Devops:
|
||||
return DevopsFactory().build_devops(devops_config(overrides))
|
||||
|
|
|
@ -2,6 +2,7 @@ import os
|
|||
from pybuilder.core import Project
|
||||
from src.main.python.ddadevops.domain.common import Devops
|
||||
from src.main.python.ddadevops.devops_build import DevopsBuild
|
||||
from .domain.test_helper import devops_config
|
||||
|
||||
|
||||
class MyDevopsBuild(DevopsBuild):
|
||||
|
@ -15,13 +16,6 @@ def test_devops_build(tmp_path):
|
|||
tmp_path_str = str(tmp_path)
|
||||
|
||||
project = Project(tmp_path_str, name=project_name)
|
||||
devops = Devops(
|
||||
stage="test",
|
||||
project_root_path=tmp_path_str,
|
||||
module=module_name,
|
||||
build_dir_name=build_dir,
|
||||
)
|
||||
|
||||
devops_build = DevopsBuild(project, devops=devops)
|
||||
devops_build = DevopsBuild(project, devops_config({}))
|
||||
devops_build.initialize_build_dir()
|
||||
assert os.path.exists(f"{devops_build.build_path()}")
|
||||
|
|
Loading…
Reference in a new issue