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:
@@ -164,25 +164,6 @@ def test_resaving_the_published_source_creates_no_draft(store: FlowStore):
|
||||
assert not store.has_draft("heating")
|
||||
|
||||
|
||||
def test_renaming_carries_the_draft_and_repoints_other_drafts(store: FlowStore):
|
||||
store.write_draft(a_flow(), 0)
|
||||
store.write_draft(
|
||||
FlowDef(
|
||||
name="display",
|
||||
nodes=[NodeDef(id="gauge", requires=[MessageSpec(name="heating.temp")])],
|
||||
),
|
||||
0,
|
||||
)
|
||||
|
||||
renamed = store.rename_flow("heating", "warmth")
|
||||
|
||||
assert renamed.name == "warmth"
|
||||
assert store.has_draft("warmth")
|
||||
assert store.read_flow("display", draft=True).nodes[0].requires[0].name == (
|
||||
"warmth.temp"
|
||||
)
|
||||
|
||||
|
||||
def test_a_duplicate_is_a_local_draft_of_what_the_editor_shows(store: FlowStore):
|
||||
flow = a_flow(title="Warm").model_copy(update={"origin": FlowOrigin()})
|
||||
flow.nodes.append(NodeDef(id="reader", requires=[MessageSpec(name="heating.temp")]))
|
||||
|
||||
Reference in New Issue
Block a user