Flows and dashboards get ids: the store is addressed by id with a key index, the first start gives every document its key as id, fluksio store migrate --dry-run and ls; the rename routes are gone

This commit is contained in:
2026-11-02 16:54:11 +01:00
parent de13c48c90
commit fae85f5ecb
20 changed files with 1287 additions and 420 deletions
@@ -86,3 +86,29 @@ def test_a_save_based_on_a_version_someone_moved_past_is_refused(
assert stale.status_code == 409
assert stale.json()["detail"]["current_version"] == 1
def test_a_dashboard_is_known_by_an_id_no_save_changes(
client: TestClient, superuser_token_headers: dict[str, str]
) -> None:
saved = client.put(
f"{PREFIX}/put_identified",
headers=superuser_token_headers,
json=a_dashboard("put_identified"),
).json()
assert saved["id"] == "put_identified"
elsewhere = client.put(
f"{PREFIX}/put_identified",
headers=superuser_token_headers,
json={**saved, "id": "elsewhere"},
)
assert elsewhere.status_code == 422
renamed = client.post(
f"{PREFIX}/put_identified/rename",
headers=superuser_token_headers,
json={"name": "renamed"},
)
assert renamed.status_code in (404, 405)
client.delete(f"{PREFIX}/put_identified", headers=superuser_token_headers)