elsa-core/test/unit/Elsa.Workflows.Management.UnitTests
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
..
Filters Refine timestamp filter validation feedback 2026-05-21 01:49:44 +02:00
Handlers/Notifications Add output converter support at binding boundaries 2026-07-31 04:10:48 +02:00
Helpers Improves workflow materializer handling (#7195) 2026-01-19 08:59:12 +01:00
Mappers Refactor: Overhauls workflow JSON type serialization (#7549) 2026-05-31 11:09:39 +02:00
Services Avoid repeated tenant-agnostic registry population 2026-08-02 01:59:45 +02:00
Stores test(workflows): share Memory/EF store conformance scenarios (#8115) 2026-09-13 18:07:09 +02:00
Elsa.Workflows.Management.UnitTests.csproj Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00