fix: keep Langflow flow names in sync files, write them world-readable

This commit is contained in:
Jonas Miederer 2026-09-25 10:44:13 +02:00
parent 95a1c1afb7
commit 3ee997cb72
8 changed files with 58 additions and 769 deletions

View file

@ -163,17 +163,17 @@ async def test_sync_endpoint_pulls_from_langflow_then_syncs(
response = await client.post("/api/flows/sync")
assert response.status_code == 200, response.text
body = response.json()
assert body["pulled"] == ["gehaltserh-hung"]
assert body["added"] == ["gehaltserh-hung"]
assert body["pulled"] == ["Gehaltserhöhung"]
assert body["added"] == ["Gehaltserhöhung"]
assert body["errors"] == {}
assert (tmp_path / "gehaltserh-hung.json").is_file()
assert (tmp_path / "Gehaltserhöhung.json").is_file()
# Second pass: same content pulls again but syncs nothing new.
response = await client.post("/api/flows/sync")
assert response.status_code == 200, response.text
body = response.json()
assert body["pulled"] == ["gehaltserh-hung"]
assert body["skipped"] == ["gehaltserh-hung"]
assert body["pulled"] == ["Gehaltserhöhung"]
assert body["skipped"] == ["Gehaltserhöhung"]
async def test_sync_endpoint_pull_reuses_same_named_file(
@ -214,8 +214,8 @@ async def test_sync_endpoint_pull_error_continues(
response = await client.post("/api/flows/sync")
assert response.status_code == 200, response.text
body = response.json()
assert body["pulled"] == ["gut"]
assert body["added"] == ["gut"]
assert body["pulled"] == ["Gut"]
assert body["added"] == ["Gut"]
assert "kaputt-id" in body["errors"]