Deterministic lifecycle scenarios for owned native resources.
The caller supplies release and probe callbacks, so production resources do not need test hooks. Every scenario uses a stable seed and reports the exact release order on failure.
Summary
Functions
Verifies every requested release order using freshly-created resources.
Types
Functions
@spec owner_graph!([Kinda.Resource.Declaration.t()]) :: %{ optional(atom() | binary()) => atom() | binary() | nil }
@spec permutations( [Kinda.Resource.Declaration.t()], keyword() ) :: [[Kinda.Resource.Declaration.t()]]
@spec verify!( [Kinda.Resource.Declaration.t()], keyword() ) :: :ok
Verifies every requested release order using freshly-created resources.
:setup returns a map keyed by declaration identity. :release receives
the declaration and its corresponding resource. :probe runs after every
release with the resources that have not been explicitly released yet.