kin: auto-commit after pipeline
This commit is contained in:
parent
94591ab7ae
commit
3d9b5766ab
10 changed files with 250 additions and 30 deletions
|
|
@ -603,6 +603,22 @@ class TestDeployWithDependents:
|
|||
assert "steps" in result
|
||||
assert "results" in result
|
||||
|
||||
def test_dependent_failure_sets_overall_success_false(self, conn):
|
||||
"""If a dependent project fails, overall_success becomes False even if main succeeded."""
|
||||
self._setup_chain(conn)
|
||||
|
||||
_ok = {"success": True, "steps": ["git pull"], "results": [{"step": "git pull", "exit_code": 0}]}
|
||||
_fail = {"success": False, "steps": ["git pull"], "results": [{"step": "git pull", "exit_code": 1}]}
|
||||
|
||||
def _mock_execute(project, db_conn):
|
||||
return _ok if dict(project)["id"] == "api" else _fail
|
||||
|
||||
with patch("core.deploy.execute_deploy", side_effect=_mock_execute):
|
||||
result = deploy_with_dependents(conn, "api")
|
||||
|
||||
assert result["success"] is False
|
||||
assert result["dependents_deployed"] == []
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 10. build_deploy_steps — python runtime full steps with restart_cmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue