kin: auto-commit after pipeline
This commit is contained in:
parent
f805aff86b
commit
6c2da26b6c
6 changed files with 138 additions and 10 deletions
|
|
@ -2122,3 +2122,32 @@ def test_run_kin085_parallel_different_tasks_not_blocked(client):
|
|||
# Запуск второй задачи должен быть успешным
|
||||
r = client.post("/api/tasks/P1-002/run")
|
||||
assert r.status_code == 202
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# KIN-ARCH-008: test_command на уровне проекта — API
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
def test_patch_project_test_command(client):
|
||||
"""KIN-ARCH-008: PATCH /api/projects/{id} с test_command сохраняет значение."""
|
||||
r = client.patch("/api/projects/p1", json={"test_command": "pytest -v"})
|
||||
assert r.status_code == 200
|
||||
assert r.json()["test_command"] == "pytest -v"
|
||||
|
||||
|
||||
def test_create_project_with_test_command(client):
|
||||
"""KIN-ARCH-008: POST /api/projects с test_command сохраняет значение в БД."""
|
||||
r = client.post("/api/projects", json={
|
||||
"id": "p_tc",
|
||||
"name": "TC Project",
|
||||
"path": "/tmp/tc",
|
||||
"test_command": "npm test",
|
||||
})
|
||||
assert r.status_code == 200
|
||||
|
||||
from core.db import init_db
|
||||
conn = init_db(api_module.DB_PATH)
|
||||
row = conn.execute("SELECT test_command FROM projects WHERE id = 'p_tc'").fetchone()
|
||||
conn.close()
|
||||
assert row is not None
|
||||
assert row[0] == "npm test"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue