ae40bb24c0
CI / lint (pull_request) Successful in 16s
CI / typecheck (pull_request) Successful in 30s
CI / security (pull_request) Successful in 22s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m45s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 10m35s
CI / coverage (pull_request) Successful in 7m16s
CI / docker (pull_request) Successful in 38s
CI / typecheck (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
67 lines
3.2 KiB
Gherkin
67 lines
3.2 KiB
Gherkin
@phase1 @domain @unit_of_work @uow_lifecycle
|
|
Feature: UnitOfWork lifecycle repository wiring
|
|
As a system operator managing v3 lifecycle entities
|
|
I want the UnitOfWork to expose actions and lifecycle_plans repositories
|
|
So that transactional persistence works across both repositories atomically
|
|
|
|
Background:
|
|
Given a UnitOfWork backed by an in-memory database for lifecycle tests
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Repository exposure
|
|
# ---------------------------------------------------------------------------
|
|
|
|
@uow_actions_repo
|
|
Scenario: UoW exposes actions repository
|
|
When I access the actions repository from the UoW context
|
|
Then the actions repository should be an ActionRepository instance
|
|
|
|
@uow_lifecycle_plans_repo
|
|
Scenario: UoW exposes lifecycle_plans repository
|
|
When I access the lifecycle_plans repository from the UoW context
|
|
Then the lifecycle_plans repository should be a LifecyclePlanRepository instance
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# CRUD via UoW
|
|
# ---------------------------------------------------------------------------
|
|
|
|
@uow_create_action
|
|
Scenario: Create action via UoW and retrieve it
|
|
When I create an action "local/uow-action" via the UoW transaction
|
|
Then the action "local/uow-action" should be retrievable from the actions repository
|
|
|
|
@uow_create_plan
|
|
Scenario: Create plan via UoW and retrieve it
|
|
Given an action "local/uow-plan-action" exists via the UoW
|
|
When I create a lifecycle plan "01HGZ6FE0AQDYTR4BX00000E01" via the UoW transaction
|
|
Then the plan "01HGZ6FE0AQDYTR4BX00000E01" should be retrievable from the lifecycle_plans repository
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Cross-repository commit
|
|
# ---------------------------------------------------------------------------
|
|
|
|
@uow_commit_persists
|
|
Scenario: UoW commit persists changes across repositories
|
|
When I create an action "local/commit-action" and a plan "01HGZ6FE0AQDYTR4BX00000E02" in a single UoW transaction
|
|
Then the action "local/commit-action" should be retrievable in a new transaction
|
|
And the plan "01HGZ6FE0AQDYTR4BX00000E02" should be retrievable in a new transaction
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Rollback
|
|
# ---------------------------------------------------------------------------
|
|
|
|
@uow_rollback
|
|
Scenario: UoW rollback discards changes across repositories
|
|
When I create an action "local/rollback-action" and a plan "01HGZ6FE0AQDYTR4BX00000E03" but force a rollback
|
|
Then the action "local/rollback-action" should not exist in a new transaction
|
|
And the plan "01HGZ6FE0AQDYTR4BX00000E03" should not exist in a new transaction
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# Legacy accessor still works
|
|
# ---------------------------------------------------------------------------
|
|
|
|
@uow_legacy_plans
|
|
Scenario: Legacy plans accessor still returns PlanRepository
|
|
When I access the legacy plans repository from the UoW context
|
|
Then the legacy plans repository should be a PlanRepository instance
|