dda-devops-build/src/test/python/test_devops_build.py

22 lines
606 B
Python
Raw Normal View History

2023-03-14 15:43:41 +00:00
import os
2023-05-13 15:05:18 +00:00
from pathlib import Path
2023-03-14 15:43:41 +00:00
from pybuilder.core import Project
2023-05-13 15:05:18 +00:00
from src.main.python.ddadevops import DevopsBuild
from .domain.helper import devops_config
from .resource_helper import copy_resource
2023-03-14 15:43:41 +00:00
def test_devops_build(tmp_path):
2023-05-13 15:05:18 +00:00
copy_resource(Path('package.json'), tmp_path)
project = Project(str(tmp_path), name="name")
2023-03-14 15:43:41 +00:00
2023-04-30 09:29:17 +00:00
devops_build = DevopsBuild(
project,
devops_config(
{
2023-05-13 15:05:18 +00:00
"project_root_path": str(tmp_path),
2023-04-30 09:29:17 +00:00
}
),
)
2023-03-14 15:43:41 +00:00
devops_build.initialize_build_dir()
assert os.path.exists(f"{devops_build.build_path()}")