add devops_build test
This commit is contained in:
parent
d650f67dbf
commit
7b198c7215
2 changed files with 27 additions and 1 deletions
|
@ -39,7 +39,6 @@ class DevopsBuild:
|
||||||
self.project = project
|
self.project = project
|
||||||
self.file_api = FileApi()
|
self.file_api = FileApi()
|
||||||
self.repo = ProjectRepository()
|
self.repo = ProjectRepository()
|
||||||
config.update({"name": project.name})
|
|
||||||
if not devops:
|
if not devops:
|
||||||
devops = Devops(stage = config['stage'],
|
devops = Devops(stage = config['stage'],
|
||||||
project_root_path = config['project_root_path'],
|
project_root_path = config['project_root_path'],
|
||||||
|
|
27
src/test/python/test_devops_build.py
Normal file
27
src/test/python/test_devops_build.py
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
import os
|
||||||
|
from pybuilder.core import Project
|
||||||
|
from src.main.python.ddadevops.domain import Devops
|
||||||
|
from src.main.python.ddadevops.devops_build import DevopsBuild
|
||||||
|
|
||||||
|
|
||||||
|
class MyDevopsBuild(DevopsBuild):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def test_devops_build(tmp_path):
|
||||||
|
build_dir = "build"
|
||||||
|
project_name = "testing-project"
|
||||||
|
module_name = "c4k-test"
|
||||||
|
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.initialize_build_dir()
|
||||||
|
assert os.path.exists(f"{devops_build.build_path()}")
|
Loading…
Reference in a new issue