fix(12-uat): add display_name_override schema regression + Compose hardening
- test_list_connections_reads_display_name_override_column: proves GET /api/cloud/connections does not raise UndefinedColumn (direct Phase 12 UAT blocker regression) - docker-compose: promtail socket :ro, Grafana password fail-fast (:?) - test_migration_0006: DDL privilege test fails not skips when role absent - README: version 0.2.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
760a8d4bcd
commit
043a7817e2
@@ -310,6 +310,32 @@ async def test_webdav_connect_validates(async_client, db_session, monkeypatch):
|
|||||||
assert resp.status_code == 422
|
assert resp.status_code == 422
|
||||||
|
|
||||||
|
|
||||||
|
async def test_list_connections_reads_display_name_override_column(
|
||||||
|
async_client, db_session, cloud_connection_factory
|
||||||
|
):
|
||||||
|
"""GET /api/cloud/connections must succeed after migration 0006.
|
||||||
|
|
||||||
|
Regression for Phase 12 UAT blocker: psycopg.errors.UndefinedColumn was raised
|
||||||
|
because cloud_connections.display_name_override did not exist in the live schema.
|
||||||
|
This test proves the ORM can read all Phase 12 columns without schema errors.
|
||||||
|
"""
|
||||||
|
auth = await _create_user_and_token(db_session, role="user")
|
||||||
|
await cloud_connection_factory(db_session, auth["user"].id, provider="nextcloud")
|
||||||
|
|
||||||
|
resp = await async_client.get(
|
||||||
|
"/api/cloud/connections",
|
||||||
|
headers=auth["headers"],
|
||||||
|
)
|
||||||
|
|
||||||
|
assert resp.status_code == 200, f"Unexpected status: {resp.status_code} — {resp.text}"
|
||||||
|
data = resp.json()
|
||||||
|
assert isinstance(data.get("items"), list)
|
||||||
|
assert len(data["items"]) == 1
|
||||||
|
conn = data["items"][0]
|
||||||
|
assert conn["provider"] == "nextcloud"
|
||||||
|
assert "credentials_enc" not in conn
|
||||||
|
|
||||||
|
|
||||||
# ── CLOUD-02: Credential encryption round-trip ────────────────────────────────
|
# ── CLOUD-02: Credential encryption round-trip ────────────────────────────────
|
||||||
|
|
||||||
async def test_credentials_enc_not_exposed(
|
async def test_credentials_enc_not_exposed(
|
||||||
|
|||||||
Reference in New Issue
Block a user