kin: KIN-ARCH-007 Дочистить оставшиеся workaround path='' после KIN-ARCH-003

This commit is contained in:
Gros Frumos 2026-03-16 10:08:50 +02:00
parent a28790d194
commit e4566d51a6
3 changed files with 7 additions and 10 deletions

View file

@ -1354,7 +1354,6 @@ def test_create_operations_project_with_ssh_fields(client):
r = client.post("/api/projects", json={
"id": "srv1",
"name": "My Server",
"path": "",
"project_type": "operations",
"ssh_host": "10.0.0.1",
"ssh_user": "root",
@ -1364,6 +1363,7 @@ def test_create_operations_project_with_ssh_fields(client):
assert r.status_code == 200
data = r.json()
assert data["project_type"] == "operations"
assert data["path"] is None
assert data["ssh_host"] == "10.0.0.1"
assert data["ssh_user"] == "root"
assert data["ssh_key_path"] == "~/.ssh/id_rsa"
@ -1397,7 +1397,6 @@ def test_create_operations_project_without_ssh_host_allowed(client):
r = client.post("/api/projects", json={
"id": "srv2",
"name": "Server No SSH",
"path": "",
"project_type": "operations",
})
# Фикс KIN-ARCH-001: был 200, стал 422
@ -1417,7 +1416,6 @@ def test_kin_arch_001_operations_without_ssh_host_returns_422(client):
r = client.post("/api/projects", json={
"id": "ops_no_ssh",
"name": "Ops Without SSH",
"path": "",
"project_type": "operations",
})
assert r.status_code == 422
@ -1429,7 +1427,6 @@ def test_kin_arch_001_operations_with_empty_ssh_host_returns_422(client):
r = client.post("/api/projects", json={
"id": "ops_empty_ssh",
"name": "Ops Empty SSH",
"path": "",
"project_type": "operations",
"ssh_host": "",
})
@ -1442,13 +1439,13 @@ def test_kin_arch_001_operations_with_valid_ssh_host_returns_200(client):
r = client.post("/api/projects", json={
"id": "ops_with_ssh",
"name": "Ops With SSH",
"path": "",
"project_type": "operations",
"ssh_host": "10.0.0.42",
})
assert r.status_code == 200
data = r.json()
assert data["project_type"] == "operations"
assert data["path"] is None
assert data["ssh_host"] == "10.0.0.42"
@ -1484,7 +1481,6 @@ def test_kin_arch_001_422_error_message_mentions_ssh_host(client):
r = client.post("/api/projects", json={
"id": "ops_err_msg",
"name": "Check Error Message",
"path": "",
"project_type": "operations",
})
assert r.status_code == 422