feat: add gui config for cli command
This commit is contained in:
@@ -7,9 +7,11 @@ from pytest_mock import MockerFixture
|
||||
|
||||
from agebd.utils import get_git_root
|
||||
from config.paths import Paths
|
||||
from core.enums import GuiOption
|
||||
from core.git import GitRepoManager
|
||||
from core.service_creator import ServiceCreator
|
||||
from models.context import ServicesContext
|
||||
from models.gui_config import GuiConfig
|
||||
|
||||
REPO_ROOT = get_git_root(__file__)
|
||||
TEST_REPO_ROOT = REPO_ROOT / "cli" / "tests" / "fixtures" / "test_repo_root"
|
||||
@@ -66,12 +68,13 @@ def test_add_new_service(tmp_path, mocker: MockerFixture):
|
||||
ctx = ServicesContext.load_from_disk(paths)
|
||||
ctx._write_paths = write_paths
|
||||
|
||||
gui_config = GuiConfig(gui_option=GuiOption.NEW, raw_ui_filename="TestService")
|
||||
creator = ServiceCreator(ctx=ctx, repo_manager=mocker.Mock(spec=GitRepoManager))
|
||||
creator.add_service(
|
||||
name="TestService99-X00",
|
||||
ioc_owner="test_user",
|
||||
ioc_description="Test Description",
|
||||
ui_filename="TestService",
|
||||
gui_config=gui_config,
|
||||
)
|
||||
|
||||
assert_are_dir_trees_equal(tmp_path, EXPECTED_OUTPUT_DIR, tmp_path)
|
||||
|
||||
Reference in New Issue
Block a user