diff --git a/src/test/python/domain/test_devops.py b/src/test/python/domain/test_devops.py index 29f94ad..0a881ea 100644 --- a/src/test/python/domain/test_devops.py +++ b/src/test/python/domain/test_devops.py @@ -1,10 +1,9 @@ import pytest +from .test_helper import build_devops from src.main.python.ddadevops.domain.common import ( Devops, ) def test_devops_buildpath(): - sut = Devops( - stage="test", project_root_path="../../..", module="cloud", name="meissa" - ) + sut = build_devops({'module': "cloud", 'name': "meissa"}) assert "../../../target/meissa/cloud" == sut.build_path() diff --git a/src/test/python/domain/test_helper.py b/src/test/python/domain/test_helper.py index aec7093..c93e3dd 100644 --- a/src/test/python/domain/test_helper.py +++ b/src/test/python/domain/test_helper.py @@ -3,7 +3,14 @@ from src.main.python.ddadevops.domain import ( ) def build_devops(overrides: dict) -> Devops: - default = {} + default = {'build_type': 'IMAGE', + 'stage': 'test', + 'project_root_path': "../../..", + 'name': 'mybuild', + 'module': 'test_image', + 'dockerhub_user': 'dockerhub_user', + 'dockerhub_password': 'dockerhub_password', + 'docker_image_tag': 'docker_image_tag',} input = default.copy() input.update(overrides) return DevopsFactory().build_devops(input)