elsa-core/test/unit/Elsa.Workflows.Api.UnitTests/Endpoints
Sipke Schoorstra f3e77fe3e7
test(workflows): share Memory/EF store conformance scenarios (#8115)
* test(workflows): share Memory/EF store conformance scenarios

Add a shared management/runtime store matrix that runs the same uniqueness
and tenant-isolation assertions against Memory and EF Core (SQLite). Memory
now rejects a second version row for the same (DefinitionId, Version, TenantId)
so that DefinitionId+Version uniqueness can fail closed on both paths.

Closes #8088

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(workflows): lock bookmark and log Find semantics

Add the remaining #8088 store-contract row: bookmark, activity-execution,
and execution-log Find/FindMany filters, paging, and same-Id upsert, run
against both Memory and EF/SQLite.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* test(workflows): correct execution-log ExcludeActivityType assertion

Exclude WriteLine only when another activity type is present, so the
shared Find row asserts a real filter match on both providers.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

* fix(management): reject duplicate definition version keys in SaveMany

MemoryWorkflowDefinitionStore.SaveManyAsync now throws when a batch
contains distinct Ids that share (DefinitionId, Version, TenantId),
matching EF unique-index failure instead of silently dropping rows.

Give the label-filter list fixture distinct versions so two red
definition rows no longer collide on the default Version=1 key.

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-09-13 18:07:09 +02:00
..
IncidentStrategies Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
RuntimeAdmin feat(auth)!: structured authorization model, phases 1-6 (#7980) 2026-08-24 23:44:55 +02:00
WorkflowDefinitions test(workflows): share Memory/EF store conformance scenarios (#8115) 2026-09-13 18:07:09 +02:00