Represents the result of a single policy test execution.
Fields
:test_name- The full name of the test:passed- Whether the test passed (true) or failed (false):message- Error message if the test failed, nil if passed:duration_us- Execution time in microseconds:module- The module containing this test (optional, set byrun_all)
Summary
Types
@type t() :: %AshGrant.PolicyTest.Result{ duration_us: non_neg_integer(), message: String.t() | nil, module: module() | nil, passed: boolean(), test_name: String.t() }
Functions
@spec fail(String.t(), String.t(), non_neg_integer()) :: t()
Creates a new Result for a failed test.
@spec pass(String.t(), non_neg_integer()) :: t()
Creates a new Result for a passed test.