fix: commit semantic repair changes
This commit is contained in:
@@ -11,6 +11,8 @@ from src.services.git_service import GitService
|
||||
from src.core.superset_client import SupersetClient
|
||||
from src.core.config_models import Environment
|
||||
|
||||
# [DEF:test_git_service_get_repo_path_guard:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_git_service_get_repo_path_guard():
|
||||
"""Verify that _get_repo_path raises ValueError if dashboard_id is None."""
|
||||
service = GitService(base_path="test_repos")
|
||||
@@ -18,6 +20,10 @@ def test_git_service_get_repo_path_guard():
|
||||
service._get_repo_path(None)
|
||||
|
||||
|
||||
# [/DEF:test_git_service_get_repo_path_guard:Function]
|
||||
|
||||
# [DEF:test_git_service_get_repo_path_recreates_base_dir:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_git_service_get_repo_path_recreates_base_dir():
|
||||
"""Verify _get_repo_path recreates missing base directory before returning repo path."""
|
||||
service = GitService(base_path="test_repos_runtime_recreate")
|
||||
@@ -28,6 +34,10 @@ def test_git_service_get_repo_path_recreates_base_dir():
|
||||
assert Path(service.base_path).is_dir()
|
||||
assert repo_path == str(Path(service.base_path) / "42")
|
||||
|
||||
# [/DEF:test_git_service_get_repo_path_recreates_base_dir:Function]
|
||||
|
||||
# [DEF:test_superset_client_import_dashboard_guard:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_superset_client_import_dashboard_guard():
|
||||
"""Verify that import_dashboard raises ValueError if file_name is None."""
|
||||
mock_env = Environment(
|
||||
@@ -42,6 +52,10 @@ def test_superset_client_import_dashboard_guard():
|
||||
client.import_dashboard(None)
|
||||
|
||||
|
||||
# [/DEF:test_superset_client_import_dashboard_guard:Function]
|
||||
|
||||
# [DEF:test_git_service_init_repo_reclones_when_path_is_not_a_git_repo:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_git_service_init_repo_reclones_when_path_is_not_a_git_repo():
|
||||
"""Verify init_repo reclones when target path exists but is not a valid Git repository."""
|
||||
service = GitService(base_path="test_repos_invalid_repo")
|
||||
@@ -61,6 +75,10 @@ def test_git_service_init_repo_reclones_when_path_is_not_a_git_repo():
|
||||
assert not target_path.exists()
|
||||
|
||||
|
||||
# [/DEF:test_git_service_init_repo_reclones_when_path_is_not_a_git_repo:Function]
|
||||
|
||||
# [DEF:test_git_service_ensure_gitflow_branches_creates_and_pushes_missing_defaults:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_git_service_ensure_gitflow_branches_creates_and_pushes_missing_defaults():
|
||||
"""Verify _ensure_gitflow_branches creates dev/preprod locally and pushes them to origin."""
|
||||
service = GitService(base_path="test_repos_gitflow_defaults")
|
||||
@@ -115,6 +133,10 @@ def test_git_service_ensure_gitflow_branches_creates_and_pushes_missing_defaults
|
||||
assert "preprod:preprod" in repo.origin.pushed
|
||||
|
||||
|
||||
# [/DEF:test_git_service_ensure_gitflow_branches_creates_and_pushes_missing_defaults:Function]
|
||||
|
||||
# [DEF:test_git_service_configure_identity_updates_repo_local_config:Function]
|
||||
# @RELATION: BINDS_TO -> UnknownModule
|
||||
def test_git_service_configure_identity_updates_repo_local_config():
|
||||
"""Verify configure_identity writes repository-local user.name/user.email."""
|
||||
service = GitService(base_path="test_repos_identity")
|
||||
@@ -130,3 +152,4 @@ def test_git_service_configure_identity_updates_repo_local_config():
|
||||
fake_repo.config_writer.assert_called_once_with(config_level="repository")
|
||||
config_writer.set_value.assert_any_call("user", "name", "user_1")
|
||||
config_writer.set_value.assert_any_call("user", "email", "user1@mail.ru")
|
||||
# [/DEF:test_git_service_configure_identity_updates_repo_local_config:Function]
|
||||
|
||||
Reference in New Issue
Block a user